|
Code doesn't compile with 4.2.1
|
09/18/2007 5:19 PM
post1370
|
Code doesn't compile with 4.2.1
template <class T>
class SharedMemory
{
public:
SharedMemory() : m_fd(-1)
{
}
public:
int m_fd;
};
template <class T>
class SharedMemoryCreator : public SharedMemory<T>
{
public:
SharedMemoryCreator()
{
m_fd = 0;
}
};
int main(void)
{
//SharedMemoryCreator<float> p;
return 0;
}
This code compiles fine with 3.3.5 but doesn't with 4.2.1. The problem is m_fd = 0 for which the compiler says:
error: 'm_fd' was not declared in this scope
I'm not sure if this is a problem with my code not being compliant with latest C++ or if it's a specific QNX 4.2.1 bug.
- Mario
|
|
|