Closed ChrisKing340 closed 7 years ago
There are two possible issues here:
(1) There are known issues with the VS 2015 "IntelliSense" compiler and DirectXMath 3.09's use of constexpr
. These are only IntelliSense errors and do not cause compile errors or warnings during build.
(2) There is a known issue with the VS 2015 RTM C++ compiler w.r.t. to constexpr
. These are fixed if you move to Update 1 or later (the current verison is VS 2015 Update 3).
There is a fix for first issue is in DirectXMath 3.10, as well as a workaround for VS 2015 RTM (which treats it the same as VS 2013 which doesn't support constexpr
). A pre-release is availble here.
DirectXMath issues should be directed to that GitHub project.
Thanks Chuck, fixed now. I will start watching the Git for DirectXMath as well. BTW, great work on TK12
Since 10.0.14393 December commit have been unable to compile with errors in files: c:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\DirectXMath.h c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\directxpackedvector.h System: DxDiag Version: 10.00.14393.0000 64bit Unicode Visual Studio Community 2015 (14.0.23107.0 D14REL) Nvidia Driver 376.33 GTX 970
Build state is Debug x64 35 errors, all with XM_CONSTEXPR
From: c:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\DirectXMath.h
for constexpr, it appears the code is not a constant expression (in first error fDegrees is not constant) Chuck, This may not be the right team to ask about it but how did you deal with this? Hate to ask, cant figure it out on my own likely means I did something stupid. Kind regards
First 3 for reference:
First error: Severity Code Description Project File Line Error (active) constexpr function return is non-constant DirectXTK12 c:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\DirectXMath.h 268
inline XM_CONSTEXPR float XMConvertToRadians(float fDegrees) { return fDegrees * (XM_PI / 180.0f); }
Second error: Severity Code Description Project File Line Error (active) constexpr function return is non-constant DirectXTK12 c:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um\DirectXMath.h 269 `inline XM_CONSTEXPR float XMConvertToDegrees(float fRadians) { return fRadians * (180.0f / XM_PI); }Third error: Severity Code Description Project File Line Error C2476 'constexpr' constructor does not initialize all members DirectXTK12 c:\program files (x86)\windows kits\10\include\10.0.14393.0\um\directxpackedvector.h 50
XM_CONSTEXPR XMCOLOR(uint32_t Color) : c(Color) {}`