You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Eric Lemings <Er...@roguewave.com> on 2008/06/26 20:27:16 UTC

Unnamed template parameters

Anyone recall if some compilers might have problems and/or issue
warnings about unnamed template parameters?  E.g.,

	template <class> struct S;

Or is this safe practice?

Brad.

Re: Unnamed template parameters

Posted by Martin Sebor <se...@roguewave.com>.
Travis Vitek wrote:
>  
> 
> Eric Lemings wrote:
>>
>> Anyone recall if some compilers might have problems and/or issue
>> warnings about unnamed template parameters?  E.g.,
>>
>> 	template <class> struct S;
>>
> 
> Martin mentioned in a review of your code that he remmbers it not being
> safe on at least one compiler. I have not encountered such a compiler,
> and I know that I'm doing it with non-type template parameters in the
> traits code.

The last time I checked HP aCC 3 didn't support unnamed template
parameters. There should be a record of the bug in our Bugzilla.
aCC 3.63 does appear to support them but due to a bug I uncovered
while checking I wouldn't say it's safe to get into the practice
of relying on it just yet:

$ cat t.cpp && aCC -V -c t.cpp
template <class, int> struct S { };
S<int, 0> s;
aCC: HP ANSI C++ B3910B A.03.73
aCC: Not enough memory is available to finish the compilation.

Martin

> 
>> Or is this safe practice?
>>
>> Brad.
>>


RE: Unnamed template parameters

Posted by Travis Vitek <Tr...@roguewave.com>.
 

Eric Lemings wrote:
>
>
>Anyone recall if some compilers might have problems and/or issue
>warnings about unnamed template parameters?  E.g.,
>
>	template <class> struct S;
>

Martin mentioned in a review of your code that he remmbers it not being
safe on at least one compiler. I have not encountered such a compiler,
and I know that I'm doing it with non-type template parameters in the
traits code.

>Or is this safe practice?
>
>Brad.
>