So what I want to do is to create a template class which may or may not contain a member variable based on the template argument passed in. like following:
template<typename T, bool flag>
class base
{
foov<std::enable_if<flag, T>::type> m_var;
};
the above code could not survive the compiler.
Does anyone know how I can achieve this?