Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Moderated > how to speciali...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 9451 of 9984
Post > Topic >>

how to specialization a template class which declare in a template class?

by ChenA <ChenA.Invalid@[EMAIL PROTECTED] > Apr 2, 2008 at 09:13 AM

I use gcc in linux.

template<class T>
class A
{
public:
    template<class N>
    class B
    {
    };
};

template<>
template<class T>
class A<T>::B<int>
{
    void test();
    T t;
};



int main()
{
    A<int>::B<int> b;
    //b.test();

    exit(0);
}

the complier said : in partial specialization didn't use template
parameter 'T'.
Why?
How to modify the code?
Thanks.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm
for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]
 




 3 Posts in Topic:
how to specialization a template class which declare in a templa
ChenA <ChenA.Invalid@[  2008-04-02 09:13:04 
Re: how to specialization a template class which declare in a
Barry <dhb2000@[EMAIL   2008-04-02 11:56:44 
RE: how to specialization a template class which declare in a t
"Baheti, Sarang"  2008-04-02 12:01:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 4:15:53 CDT 2008.