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++/15359] errors specializing a template class of a template class


------- Additional Comments From igodard at pacbell dot net  2004-05-10 17:39 -------
Specializing outside doesn't work either:

template<typename E>
class   F {
public:
    template<typename G>
    class H {
    public:
        };
    H<E>    h;
    };

template<>
class H<bool> {
public:
    bool b;
    };

template<typename E>
F<E>::H<int> {
public:
    int i;
    };

F<int>::H<char> {
public:
    char c;
    };

template<>
F<int>::H<char> {
public:
    char c;
    };

int main() {
    return 0;
    }

gets me:
~/ootbc/common/test/src$ g++ foo.cc
foo.cc:12: error: `H' is not a template
foo.cc:12: error: explicit specialization of non-template `H'
foo.cc:18: error: expected unqualified-id before '{' token
foo.cc:18: error: expected `;' before '{' token
foo.cc:23: error: expected unqualified-id before '{' token
foo.cc:23: error: expected `,' or `;' before '{' token
foo.cc:29: error: expected unqualified-id before '{' token
foo.cc:29: error: expected `;' before '{' token


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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