1

I've got this example which compiles under MSVC2015 but not Clang. I'm programming code that I want to run everywhere. I get an "error : expected expression" message. I've searched SO but I can't seem to find this exact same problem.

template<int T>
class SomeClass {
public:
    template<int S>
    int Foo()
    {
        return S;
    }
};

template<int X>
void Fun()
{
    SomeClass<X> c;
    c.Foo<0>();
}

int main()
{
    Fun<0>();
}
RedOrav
  • 903
  • 8
  • 20

0 Answers0