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++/14032] non type boolean template argument partial specialization to argument in parent never matches


------- Additional Comments From bangerth at dealii dot org  2004-02-05 21:54 -------
And just as a sidenote: this bug may be related to the fact 
that we reject this explicit (full) specialization in this code: 
------------------------- 
template <bool B1> struct outer { 
    template <bool B2> 
    struct inner { 
        static int f() { return inner<!B2>::N; }; 
    }; 
 
    template <> 
    struct inner<B1> { 
        static const int N = 1; 
    }; 
}; 
 
int i = outer<false>::inner<true>::f(); 
---------------------------- 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ x.cc -c 
x.cc:7: error: invalid explicit specialization before '>' token 
x.cc:7: error: explicit specialization in non-namespace scope `struct 
outer<B1>' 
x.cc:7: error: enclosing class templates are not explicitly specialized 
g/x>  
g/x> icc -c x.cc 
g/x>  

-- 


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


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