J
Johan
Hi
Can somebody explain to me why I get this warning message and how I
can solve this warning message.
Thanks a lot
Johan
In member function `void
Callback1<Par>::search()':
b.cpp:44: warning: `typename std::vector<Callback<Par>,
std::allocator<Callback<Par> > >::iterator' is implicitly a
typename
b.cpp:44: warning: implicit typename is deprecated, please see the
documentation for details
template <class Par>
class Callback
{
public :
Callback(const Par& par) : par(par)
{
}
~Callback()
{
}
void show()
{
cout << par << endl;
}
private :
Par par;
};
template <class Par>
class Callback1 : public Callback<Par>
{
public :
typedef Callback< Par > CallbackPar;
Callback1(const Par& par) : Callback<Par>(par)
{
v.push_back(par);
}
~Callback1()
{
}
void search()
{
vector< Callback< Par > >::iterator i;
}
private :
vector< Callback< Par > > v;
};
b.cpp: In member function `void Callback1<Par>::search()':
b.cpp:44: warning: `typename std::vector<Callback<Par>,
std::allocator<Callback<Par> > >::iterator' is implicitly a
typename
b.cpp:44: warning: implicit typename is deprecated, please see the
documentation for details
Can somebody explain to me why I get this warning message and how I
can solve this warning message.
Thanks a lot
Johan
In member function `void
Callback1<Par>::search()':
b.cpp:44: warning: `typename std::vector<Callback<Par>,
std::allocator<Callback<Par> > >::iterator' is implicitly a
typename
b.cpp:44: warning: implicit typename is deprecated, please see the
documentation for details
template <class Par>
class Callback
{
public :
Callback(const Par& par) : par(par)
{
}
~Callback()
{
}
void show()
{
cout << par << endl;
}
private :
Par par;
};
template <class Par>
class Callback1 : public Callback<Par>
{
public :
typedef Callback< Par > CallbackPar;
Callback1(const Par& par) : Callback<Par>(par)
{
v.push_back(par);
}
~Callback1()
{
}
void search()
{
vector< Callback< Par > >::iterator i;
}
private :
vector< Callback< Par > > v;
};
b.cpp: In member function `void Callback1<Par>::search()':
b.cpp:44: warning: `typename std::vector<Callback<Par>,
std::allocator<Callback<Par> > >::iterator' is implicitly a
typename
b.cpp:44: warning: implicit typename is deprecated, please see the
documentation for details