This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Template Template Matching Problem on Defaults (old g++ extension induced problem -- bug 9737)
- From: Tyson Whitehead <twhitehe at uwo dot ca>
- To: gcc at gcc dot gnu dot org
- Cc: Wolfgang Bangerth <bangerth at ices dot utexas dot edu>, Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Date: Mon, 20 Sep 2004 14:22:08 -0400
- Subject: Re: Template Template Matching Problem on Defaults (old g++ extension induced problem -- bug 9737)
- References: <Pine.LNX.4.44.0409201104540.13253-100000@terra.ices.utexas.edu>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On September 20, 2004 12:11 pm, Wolfgang Bangerth wrote:
> That isn't the point. The reason was so that people can match
> std::vector<int>
> std::set<int>
> ...
> etc to template template parameters with only one template argument,
> despite the fact that these classes have more than just one, and possibly
> different numbers of template arguments, all of which except for the first
> have default arguments.
On September 20, 2004 12:52 pm, Gabriel Dos Reis wrote:
> The Core group clarified the point saying that template parameters
> and default arguments are intended to be treated the same way as
> function parameters and default arguments.
>
> With template aliases coming in, I think this extension can go away.
Thanks all, for the clarification.
It probably moot for this case, as it sounds like this non-core extension will
probably be going out with template alias coming in, but shouldn't g++
extensions that provide extra candidates over the C++ standard be made to
match less strongly then C++ standard candidates to ensure g++ specific
ambiguities aren't introduced into perfectly valid code (such as that in the
original email)?
- -T
- --
Tyson Whitehead (-twhitehe at uwo.ca -- WSC-)
Computer Engineer Dept. of Applied Mathematics,
Graduate Student- Applied Mathematics University of Western Ontario,
GnuPG Key ID# 0x8A2AB5D8 London, Ontario, Canada
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBTx/XRXbLmIoqtdgRAjM+AKDtkEIRgvQQ71GuELB2BC62I9gRZgCfeFOB
WqOklFtxnqAJjA1M/3ii+rs=
=uH3W
-----END PGP SIGNATURE-----