From: Augustin Degomme Date: Thu, 21 Apr 2022 22:40:16 +0000 (+0200) Subject: bump C++ requirement to 17 (ns3 will need it for v3.26) X-Git-Tag: v3.32~314 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d5718258083be61d600e55b70915ccca43666e0f bump C++ requirement to 17 (ns3 will need it for v3.26) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 41c59b6e91..ca5ab2d733 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,15 +45,15 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g3") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3") if (CMAKE_COMPILER_IS_GNUCC) - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0") + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0") message(FATAL_ERROR - "SimGrid needs at least g++ version 5.0 to compile but you have ${CMAKE_CXX_COMPILER_VERSION}." - "You need a sufficient support of c++14 to compile SimGrid.") + "SimGrid needs at least g++ version 7.0 to compile but you have ${CMAKE_CXX_COMPILER_VERSION}." + "You need a sufficient support of c++17 to compile SimGrid.") endif() endif() ## We need a decent support of the C++14 and C11 standards -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD 11) diff --git a/src/xbt/PropertyHolder.cpp b/src/xbt/PropertyHolder.cpp index e77cd01f1c..bb798c9f90 100644 --- a/src/xbt/PropertyHolder.cpp +++ b/src/xbt/PropertyHolder.cpp @@ -43,7 +43,7 @@ template void PropertyHolder::set_properties(const Assoc& properti properties_ = std::make_unique>(); std::unordered_map props(std::cbegin(properties), std::cend(properties)); #if __cplusplus >= 201703L - props.merge(properties_); + props.merge(*properties_); #else props.insert(properties_->cbegin(), properties_->cend()); #endif