Skip to content

Commit 66878ea

Browse files
committed
C++17 or later use inline constexpr vars
1 parent 0474c59 commit 66878ea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Inc/DirectXMath.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,9 @@ namespace DirectX
20062006
// separate math routine it would be reloaded.
20072007

20082008
#ifndef XMGLOBALCONST
2009-
#if defined(__GNUC__) && !defined(__MINGW32__)
2009+
#if __cplusplus >= 201703L
2010+
#define XMGLOBALCONST inline constexpr
2011+
#elif defined(__GNUC__) && !defined(__MINGW32__)
20102012
#define XMGLOBALCONST extern const __attribute__((weak))
20112013
#else
20122014
#define XMGLOBALCONST extern const __declspec(selectany)

0 commit comments

Comments
 (0)