瀏覽代碼

Added __cpluplus check for GCC to disable constexpr similarly to VS2015 check (#202)

alekseyt 6 年之前
父節點
當前提交
d021b3a49f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/bx/macros.h

+ 1 - 1
include/bx/macros.h

@@ -115,7 +115,7 @@
 
 
 /// The return value of the function is solely a function of the arguments.
 /// The return value of the function is solely a function of the arguments.
 ///
 ///
-#if BX_COMPILER_MSVC && (BX_COMPILER_MSVC <= 1900)
+#if (BX_COMPILER_MSVC && (BX_COMPILER_MSVC <= 1900)) || (BX_COMPILER_GCC && (__cplusplus < 201402L))
 #	define BX_CONSTEXPR_FUNC BX_CONST_FUNC
 #	define BX_CONSTEXPR_FUNC BX_CONST_FUNC
 #else
 #else
 #	define BX_CONSTEXPR_FUNC constexpr BX_CONST_FUNC
 #	define BX_CONSTEXPR_FUNC constexpr BX_CONST_FUNC