typedef template with static const member
Hi,
1 2 3 4 5 6 7
|
class Tracker
{
public:
static const int type;
typedef cv_types::CvType<type>::type_t type_t;
};
const int Tracker::type = 1;
|
gives me the error:
'I' : invalid template argument for 'cv_types::CvType', expected compile-time constant expression
Shouldn't the static const int be a compile time constant?
How would I specify it, so that it works?
PS.: The code works with #define type 1 at the top of the file and without
the static const int.
Thanks
nvm, it works when I put the initialization into the class:
1 2 3 4 5 6
|
class Tracker
{
public:
static const int type = 1;
typedef cv_types::CvType<type>::type_t type_t;
};
|
Topic archived. No new replies allowed.