c++ - xtgmath.h has compile-time errors -
i trying compile older c++ program in visual studio 2013 professional. encountering compile error, visual studio saying there syntax errors in xtgmath.h file. complete log is:
1> fill.cpp 1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): error c2059: syntax error : '('
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): error c2027: use of undefined type 'std::enable_if'
1> c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtr1common(67) : see declaration of 'std::enable_if'
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): warning c4346: 'std::is_integral<_ty>::value' : dependent name not type
1> prefix 'typename' indicate type
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): error c2988: unrecognizable template declaration/definition
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): error c2143: syntax error : missing ')' before ','
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): error c4430: missing type specifier - int assumed. note: c++ not support default-int
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): error c2059: syntax error : ','
1>c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtgmath.h(179): error c2059: syntax error : ')'
i have tried several different things others have recommended, none of seems work. tried run preprocessor on source file , examine generated code, offered no insights. have idea what's going wrong here?
i have exact same error -- working old code , trying compile under vs2013. me problem tied line of xtgmath.h:
_generic_math1(round, _crtspecial)
i nailed down round being predefined in stdafx.h. in vs2013, round built in function , having definition override caused compile errors.
to solve have commented out round definition in stdafx.h.
Comments
Post a Comment