C
Chameleon
This code below compiles fine with VS.2005 but with gcc 3.4.2 not.
------------------
template<class T>
static void Wastage1D::clever_erase(vector<T> &v, vector<typename
vector<T>::iterator> &its, vector<T> &vo)
{ ........ }
------------------
I run gcc like this:
gcc -c wastage1d.cpp
The error message of gcc:
------------------
wastage1d.cpp:140: error: cannot declare member function `static void
std::allocator<_CharT> >&)' to have static linkage
wastage1d.cpp: In static member function `static void
std::allocator<_CharT> >&)':
------------------
template<class T>
static void Wastage1D::clever_erase(vector<T> &v, vector<typename
vector<T>::iterator> &its, vector<T> &vo)
{ ........ }
------------------
I run gcc like this:
gcc -c wastage1d.cpp
The error message of gcc:
------------------
wastage1d.cpp:140: error: cannot declare member function `static void
std::allocator<_CharT> >::iterator> >&, std::vector<T,wastage::Wastage1D::clever_erase(std::vector said:>&, std::vector<typename std::vector<T, std::allocator<_CharT>
>::iterator, std::allocator<typename std::vector<T,
std::allocator<_CharT> >&)' to have static linkage
wastage1d.cpp: In static member function `static void
std::allocator<_CharT> >::iterator> >&, std::vector<T,wastage::Wastage1D::clever_erase(std::vector said:>&, std::vector<typename std::vector<T, std::allocator<_CharT>
>::iterator, std::allocator<typename std::vector<T,
std::allocator<_CharT> >&)':