Skip to content

Commit

Permalink
corrected inclusion of <optional>
Browse files Browse the repository at this point in the history
  • Loading branch information
robertramey committed Nov 3, 2023
1 parent e01b988 commit ff0a5f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions CMake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,26 @@ add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
message(STATUS "C compiler is ${CMAKE_C_COMPILER_ID}" )

if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
add_definitions( -std=c++11 )
add_definitions( -ftemplate-depth=255 )
# we use gcc to test for C++03 compatibility
set(COMPILER_SUPPORTS_CXX11 FALSE)
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
add_definitions( /wd4996 )
set(COMPILER_SUPPORTS_CXX11 TRUE)
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
add_definitions( -std=c++17 )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth=300")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0" )
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -dead_strip")
set(COMPILER_SUPPORTS_CXX11 TRUE)
endif()

add_definitions( -std=c++20 )
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")

#
# Locate Project Prerequisites
#
Expand Down
2 changes: 1 addition & 1 deletion include/boost/serialization/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <boost/config.hpp>
#include <boost/optional.hpp>
#ifdef BOOST_NO_CXX17_HDR_OPTIONAL
#ifndef BOOST_NO_CXX17_HDR_OPTIONAL
#include <optional>
#endif

Expand Down

0 comments on commit ff0a5f9

Please sign in to comment.