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++/23823] Is this right?


------- Additional Comments From igodard at pacbell dot net  2005-09-11 15:44 -------
Nah, tried:

struct foo {
    template<bool b>
    void    f();
    template<typename T, bool b>
    void    g();
    };

template<>
void    foo::f<true>() {}
template<>
void    foo::f<false>() {}
template<typename T, bool b>
void    foo::g<T, true>() {}
template<typename T, bool b>
void    foo::g<T, false>() {}


which gets me:

~/ootbc/members/src$ g++ foo.cc
foo.cc:13: error: partial specialization `g<T, true>' of function template
foo.cc:15: error: partial specialization `g<T,  false>' of function template
foo.cc:15: error: redefinition of `void foo::g()'
foo.cc:13: error: `void foo::g()' previously declared here
~/ootbc/members/src$ fg




-- 


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


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