I am using Visual Studio 2013 and having some issues with a function returning a nested template class inside a template outer class. I have made a minimal example, the real one involves a lot more code:
template<typename R, typename... S>
class Foo
{
public:
template<typename T>
class Bar
{
};
};
template<typename T, typename R, typename... S>
typename Foo<R, S...>::Bar<T> fooBar() { // <--- LINE 33
}
This yields a whole set of errors (mostly from subsequent code):
- 33: error C2988: unrecognizable template declaration/definition
- 33: error C2059: syntax error : '<'
And it also affects subsequent code, tons of syntax error come for all the lines afterwards.
Am I not seeing something or could this be an issue of Visual Studio?