#include <list>
#include <boost/tuple/tuple.hpp>
template<class InputIterator>
void f(InputIterator it)
{
typedef boost::tuple<typename InputIterator::value_type, int> Pair;
std::list<Pair> paired;
typename std::list<Pair>::const_iterator output;
for(output=paired.begin(); output!=paired.end(); ++output)
{
output->get<1>();
}
}
I'm getting libraries with this template function. Gcc 4.1.2 (codepad.org) reports the following error:
In function 'void f(InputIterator)':
Line 12: error: expected primary-expression before ')' token
compilation terminated due to -Wfatal-errors.
Could someone more experienced with templates offer advice? Either the problem or key phrases to research myself? This has me stuck.