🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #4112

Re: Template argument deduction

#4112
From: Matt Austern
Date: Fri, 19 Apr 1996 14:49
40 lines
2682 bytes
In article <FREYBURG.96Apr18141053@wavelet.stanford.edu>
freyburg@wavelet.stanford.edu (Brian Michael Freyburger) writes:

> > It's a non-issue since default template arguments cannot be
> > specified for function templates.
> > 
> > 	Daveed
> 
> Where in the working papers does it say this?  They appear to me to be
> introduced in 14.8 [temp.arg], which as far as I can tell applies to
> both functions and classes.  I see nothing in 14.10 [temp.fct] which
> disallows them--what did I miss?

That's right: there's nothing in the WP that disallows default
template arguments for functions; there's also nothing there, though,
that says what their semantics would be if they were allowed.  

The committee had to choose between defining the semantics of default
template arguments for functions, or simply disallowing them; it chose
the latter.  This decision was made at the Santa Cruz meeting, so it
isn't yet reflected in a new version of the WP.

I don't think there would have been any technical problems with
allowing default template arguments for function templates; it's just
that it would have required a fair amount of work to come up with a
clear set of rules.  (I can think of at least three or four issues
that would have had to be resolved, which probably means that there
are another dozen that I haven't thought of.)  The general feeling was
that the feature wouldn't have been important enough to be worth that
much effort.
-- 
Matt Austern
SGI: MTI Compilers Group
austern@isolde.mti.sgi.com
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <AUSTERN.96Apr18160013@isolde.mti.sgi.com>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <FREYBURG.96Apr15144107@glitch.stanford.edu> <xsoratnorr5.fsf@avs.cs.rpi.edu> <FREYBURG.96Apr18141053@wavelet.stanford.edu>

Show Full Headers
Complete Article Headers
From: austern@isolde.mti.sgi.com (Matt Austern)
Message-ID: <AUSTERN.96Apr18160013@isolde.mti.sgi.com>
X-Original-Date: 18 Apr 1996 23:00:13 GMT
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 19 Apr 96 14:49:33 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
Subject: Re: Template argument deduction
Organization: SGI
References: <FREYBURG.96Apr15144107@glitch.stanford.edu> <xsoratnorr5.fsf@avs.cs.rpi.edu>
 <FREYBURG.96Apr18141053@wavelet.stanford.edu>
Reply-To: austern@mti.mti.sgi.com
In-Reply-To: freyburg@wavelet.stanford.edu's message of 18 Apr 1996 21:14:46 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMXeoCOEDnX0m9pzZAQHAPAF+NoVTu7+hu+JJjKWkmC3fYVPAawvuaQD4
 RMehIjS/uBhE8Ze9/pXVe0tXn6b8E+cO
 =bqAV