🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Template argument deduction

#4105
From: Brian Michael Freyburger
Date: Thu, 18 Apr 1996 21:14
30 lines
1799 bytes
> >>>>> "BF" == Brian Michael Freyburger <freyburg@glitch.stanford.edu> writes:
> BF> Reading section 14.10.2 of the January WP, I can not figure out
> BF> whether the following function call can be deduced:
> 
> BF> template <class S, class T = S>
> BF> int foo(S s, T t = T());
> 
> 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?

Why are they disallowed?  Are there any technical difficults?

Thanks,

Brian 


[ 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: <FREYBURG.96Apr18141053@wavelet.stanford.edu>
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
References: <FREYBURG.96Apr15144107@glitch.stanford.edu> <xsoratnorr5.fsf@avs.cs.rpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage
From: freyburg@wavelet.stanford.edu (Brian Michael Freyburger)
Newsgroups: comp.std.c++
Subject: Re: Template argument deduction
Date: 18 Apr 1996 21:14:46 GMT
Organization: Stanford University
Approved: clamage@eng.sun.com (comp.std.c++)
Message-ID: <FREYBURG.96Apr18141053@wavelet.stanford.edu>
References: <FREYBURG.96Apr15144107@glitch.stanford.edu> <xsoratnorr5.fsf@avs.cs.rpi.edu>
NNTP-Posting-Host: taumet.eng.sun.com
X-Nntp-Posting-Host: wavelet.stanford.edu
In-Reply-To: vandevod@cs.rpi.edu's message of 18 Apr 96 00:49:20 GMT
Content-Length: 718
X-Lines: 23
Originator: clamage@taumet