소스 검색

defs: use noexcept only for C++11 and more

Justin Carpentier 5 년 전
부모
커밋
031d3b648e
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      include/assimp/defs.h

+ 5 - 1
include/assimp/defs.h

@@ -306,7 +306,11 @@ static const ai_real ai_epsilon = (ai_real) 0.00001;
 #define AI_MAX_ALLOC(type) ((256U * 1024 * 1024) / sizeof(type))
 
 #ifndef _MSC_VER
-#  define AI_NO_EXCEPT noexcept
+#  if __cplusplus >= 201103L // C++11
+#    define AI_NO_EXCEPT noexcept
+#  else
+#    define AI_NO_EXCEPT
+#  endif
 #else
 #  if (_MSC_VER >= 1915 )
 #    define AI_NO_EXCEPT noexcept