Partial member of class template specialization

Discussion in 'C++' started by Petre Iantu, Aug 17, 2003.

  1. Petre Iantu

    Petre Iantu Guest

    How can I partlialy specialize function func below for <class Class, int>
    for example?



    Thanks,

    Petre



    template<class Class, class Dummy>

    class Template

    {

    public:

    Class func(Dummy param);

    };

    template <class Class, class Dummy> Class Template<Class, Dummy>::func(Dummy
    f)

    {

    }

    template <class Class, int> Class Template<Class, int>::func(int f)

    {

    }

    int main()

    {

    Template<int, int> a;

    }
     
    Petre Iantu, Aug 17, 2003
    #1
    1. Advertising

  2. Petre Iantu

    Petre Iantu Guest

    > How can I partlialy specialize function func below for <class Class, int>
    > for example?


    Sorry, I've found the answer... I should've specialized the class before.

    Petre
     
    Petre Iantu, Aug 17, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Levent
    Replies:
    5
    Views:
    11,197
    Victor Bazarov
    May 10, 2005
  2. Kai-Uwe Bux
    Replies:
    1
    Views:
    498
  3. toton
    Replies:
    1
    Views:
    627
  4. puzzlecracker
    Replies:
    2
    Views:
    291
    James Kanze
    Jan 29, 2009
  5. vj
    Replies:
    1
    Views:
    501
Loading...

Share This Page