I have this piece of code:
std::map< int, std::pair<int, int> > m;
for ( std::vector<Pass*>::const_iterator passIt = it->GetPasses().begin(); passIt != it->GetPasses().end(); ++passIt )
{
m.insert( std::make_pair((*passIt)->GetType(), (*passIt)->GetAgeRange()) );
}
--> ages.push_back( new std::istringstream(SerializeAges(m)) ); <--
The marked line yields this error:
undefined reference to `SerializeAges(std::map<int, std::pair<int, int>, std::less<int>,
std::allocator<std::pair<int const, std::pair<int, int> > > > const&)'
Declaration:
static std::string SerializeAges(const std::map< int, std::pair<int, int> > &ageMap);
Definition:
inline std::string SerializeAges(const std::map< int, std::pair<int, int> > &ageMap)
{
}
Signatures of other called functions:
std::pair<int, int> GetAgeRange() const;
I have no idea what goes wrong here.
EDIT: sorry, Type
is an enum, so what GetType()
returns is implicitly converted to an int.