S
steve yee
#include <iostream>
#include <list>
template<class mt_policy>
class Base
{
public:
int a;
};
template<class mt_policy = int>
class signal0 : public Base<mt_policy>
{
public:
void aaa()
{
std::cout<<"a = "<<a<<std::endl;
}
};
int main()
{
signal0<int> p;
p.aaa();
}
~
test.cpp: In member function ‘void signal0<mt_policy>::aaa()’:
test.cpp:17: error: ‘a’ was not declared in this scope
#include <list>
template<class mt_policy>
class Base
{
public:
int a;
};
template<class mt_policy = int>
class signal0 : public Base<mt_policy>
{
public:
void aaa()
{
std::cout<<"a = "<<a<<std::endl;
}
};
int main()
{
signal0<int> p;
p.aaa();
}
~
test.cpp: In member function ‘void signal0<mt_policy>::aaa()’:
test.cpp:17: error: ‘a’ was not declared in this scope