D
Dan W.
Hello, I'm starting to think this may be a problem with minGW.. I have a
template class with an embedded class which I want to make a static
instance member of the template outer class...
#include <vector>
#include <algorithm>
#include "time_stamp.h"
#include "frame_num.h"
using namespace ::std;
template< class M >
class notification
{
time_stamp t_stamp;
frame_num frame_no;
public:
virtual ~notification(){} //must be virtual
class router
{
router(router const &); //no copying
void operator=(router const &);
public:
.............
};
static router r;
};
template< class M >
notification<M>::router
notification<M>::r(); // HERE'S THE PROBLEM REPORTED
The invocacion is:
struct pass_int : public notification< pass_int >
{
int the_int;
};
MinGW, at the line marked above, says...
"expected constructor, destructor, or type conversion before 'notification'"
"expected ';' before 'notification'
Or am I doing something wrong?
template class with an embedded class which I want to make a static
instance member of the template outer class...
#include <vector>
#include <algorithm>
#include "time_stamp.h"
#include "frame_num.h"
using namespace ::std;
template< class M >
class notification
{
time_stamp t_stamp;
frame_num frame_no;
public:
virtual ~notification(){} //must be virtual
class router
{
router(router const &); //no copying
void operator=(router const &);
public:
.............
};
static router r;
};
template< class M >
notification<M>::router
notification<M>::r(); // HERE'S THE PROBLEM REPORTED
The invocacion is:
struct pass_int : public notification< pass_int >
{
int the_int;
};
MinGW, at the line marked above, says...
"expected constructor, destructor, or type conversion before 'notification'"
"expected ';' before 'notification'
Or am I doing something wrong?