1
我想一個額外的轉換操作符添加到模板子類作爲專業化 - 即:在專業化添加一個方法
- 可以一spelcialization繼承其主模板中的所有方法的一個特例?
template<class T>
MyClass
{
public:
operator Foo() { return(getAFoo()); }
};
template<>
MyClass<Bar>
{
public:
// desire to ADD a method to a specialization yet inherit
// all methods from the main template it specializes ???
operator Bar() { return(getABar()); }
};