I would like to kindly ask you for help with partially specialized class member function definition... let the code explain more:
I have a generic class declaration:
template<typename GEAR_TYPE, typename ENABLER = void>
class PartiallySpecializedClass;
Then I try to partially specialize the class using boost::enable_if
template<typename TYPE_LIST, typename QUERY_TYPE>
struct IsTypeInList
{
typedef typename boost::mpl::find<TYPE_LIST, QUERY_TYPE>::type TypePos;
typedef typename boost::mpl::end<TYPE_LIST>::type Finish;
typedef typename boost::mpl::not_<boost::is_same<TypePos, Finish> >::type type;
typedef typename type::value_type value_type;
static const bool value = type::value;
};
template<typename GEAR_TYPE>
class PartiallySpecializedClass<GEAR_TYPE, typename boost::enable_if<typename IsTypeInList<InvoluteToothTypes, GEAR_TYPE>::type >::type >
{
public:
void Test( void );
};
If I try to define the method in the class declaration itself, it works fine. But the problems come when I try to define them in separate .cpp file:
template<typename GEAR_TYPE>
void PartiallySpecializedClass< /* WHAT TO PLACE HERE???? */ >::Test( void )
{
}
Is that even possible to define member method of partially specialized class in a separate .cpp file?
Many thanks in advance to anybody who is going to try to help me with this topic. I hope this may help to anybody else having the same nightmare as me :o)