This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17344] completely wacky error with matching template template classes and default arguments


------- Additional Comments From bangerth at dealii dot org  2004-09-16 16:22 -------
Given my explanation, one can of course omit the friend function 
injection: 
-------------------- 
template <class> struct intTraits; 
 
template<> struct intTraits<int> { 
    static const int i = 0; 
}; 
 
template<typename E, E i = intTraits<E>::i> struct A {}; 
 
struct S { 
    template <template <typename> class X> S(X<void>); 
}; 
 
int bar(S); 
int bar(A<int,0>); 
 
A<int> bed; 
int i = bar(bed); 
----------------------- 
 
g/x> /home/bangerth/bin/gcc-4.0-pre/bin/c++ -c x.cc 
x.cc:17: error: template argument 2 is invalid 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17344


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]