mardi 25 juillet 2017

c++ is not a class template

I need to define a structure that has a tuple composed of a template class.

Usage:

TestStruct<A, float, float, int32_t> test_a = { std::make_tuple(A(1.0), A(2.0), A(3)) };
TestStruct<B, float, float, int32_t> test_b = { std::make_tuple(B(1.0), B(2.0), B(3)) };

At the moment my implementation looks like:

template<typename ClassBase, typename... ParamType>
struct TestStruct
{
    std::tuple<typename ParamBase<ParamType>...>  m_testValues;
};

By compiling I get following errors:

error: ‘ParamBase’ is not a class template
     std::tuple<class ParamBase<ParamType>...>  m_testValues;
                      ^

How do I have to define my structure?

Aucun commentaire:

Enregistrer un commentaire