c++ partial specialization: How can I specialize this template to this template?

后端 未结 2 1844
花落未央
花落未央 2021-01-20 06:59
#include 
using namespace std;

template 
class A {
public:
    void taunt() { cout << \"A\"; }
};

template 

        
2条回答
  •  日久生厌
    2021-01-20 07:43

    You can use a (sensible) default for the second instantiating type:

    template 
    class A {
    public:
        void taunt() { cout << "A"; }
    };
    

提交回复
热议问题