While trying to port some code to compile in linux I get peculiar compilation errors. Searching through the codebase I finally manage to get it down to the following code.
5: // include and using statements 6: template<typename RT, typename T1> 7: RT func(tuple<T1> const& t) { 8: return t.get<0>(); 9: } 10: // test code Trying to use it I get the error:
test.cpp: In function <functionName>: test.cpp:8: error: expected primary-expression before ‘)’ token The code works fine in Visual Studio but for some reason I can't figure out why it doesn't work with g++. Anyone here got a clue how on how to work around this?