refactor: Use C++17 standard

This commit is contained in:
Sirius Bakke 2020-12-30 01:22:33 +01:00
parent a5b8af05e8
commit 3359246b9a
2 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,7 @@ endif()
### Compiler options
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CXX_DEFAULT_FLAGS # clang/GCC warnings
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wall;-Wextra;-Werror;-Wno-overloaded-virtual>

View File

@ -299,7 +299,11 @@ protected:
{
#ifdef ANTLR_CXX_SUPPORTS_UNCAUGHT_EXCEPTION
// Only give trace if there's no uncaught exception..
# if __cplusplus >= 201703
if(ANTLR_USE_NAMESPACE(std)uncaught_exceptions() == 0)
# else
if(!ANTLR_USE_NAMESPACE(std)uncaught_exception())
# endif
#endif
parser->traceOut(text);
}