xtgmath.h has compile-time errors

I am trying to compile an older C++ program in Visual Studio 2013 Professional. I am encountering a compile error, with Visual Studio saying that there are syntax errors in the xtgmath.h file. The complete log is:

1> fill.cpp 1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): error C2059: syntax error : ‘(‘

1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): error C2027: use of undefined type ‘std::enable_if’

1> C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextr1common(67) : see declaration of ‘std::enable_if’

1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): warning C4346: ‘std::is_integral<_Ty>::value’ : dependent name is not a type

1> prefix with ‘typename’ to indicate a type

1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): error C2988: unrecognizable template declaration/definition

1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): error C2143: syntax error : missing ‘)’ before ‘,’

1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): error C4430: missing type specifier – int assumed. Note: C++ does not support default-int

1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): error C2059: syntax error : ‘,’

1>C:Program Files (x86)Microsoft Visual Studio
12.0VCincludextgmath.h(179): error C2059: syntax error : ‘)’

I have tried several different things that others have recommended, but none of it seems to work. I tried to run the preprocessor over the source file and examine the generated code, but it offered no insights. Does anyone have an idea about what’s going wrong here?


Source: c++

Leave a Reply