Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Templates with two params

6 views
Skip to first unread message

ArbolOne

unread,
Sep 28, 2012, 4:30:57 PM9/28/12
to
Templates with two params
template <class T, const int> class Data
{
private:
T data;
int id;
public:
Data();
protected:
};
template <class T, const int>
Data<T, const int>::Data()
{
//ctor

}

What am I doing wrong?

ArbolOne

unread,
Sep 28, 2012, 5:21:24 PM9/28/12
to
GCC reports this error message:

../data.cpp:6: error: type/value mismatch at argument 2 in template parameter list for 'template<class T, int <anonymous> > class jme::Data'
../data.cpp:6: error: expected a constant of type 'int', got 'const int'
0 new messages