Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bump C++ requirement to 17 (ns3 will need it for v3.26)
authorAugustin Degomme <adegomme@users.noreply.github.com>
Thu, 21 Apr 2022 22:40:16 +0000 (00:40 +0200)
committerAugustin Degomme <adegomme@users.noreply.github.com>
Thu, 21 Apr 2022 22:40:16 +0000 (00:40 +0200)
CMakeLists.txt
src/xbt/PropertyHolder.cpp

index 41c59b6..ca5ab2d 100644 (file)
@@ -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)
index e77cd01..bb798c9 100644 (file)
@@ -43,7 +43,7 @@ template <class Assoc> void PropertyHolder::set_properties(const Assoc& properti
     properties_ = std::make_unique<std::unordered_map<std::string, std::string>>();
   std::unordered_map<std::string, std::string> props(std::cbegin(properties), std::cend(properties));
 #if __cplusplus >= 201703L
-  props.merge(properties_);
+  props.merge(*properties_);
 #else
   props.insert(properties_->cbegin(), properties_->cend());
 #endif