diff --git a/CMakeLists.txt b/CMakeLists.txt index ae93af658..e1c98a522 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ file(STRINGS VERSION NS3_VER) # minimum compiler versions set(AppleClang_MinVersion 11.0.0) -set(Clang_MinVersion 6.0.0) +set(Clang_MinVersion 10.0.0) set(GNU_MinVersion 8.0.0) # common options diff --git a/build-support/compiler-workarounds/ostream-operator-nullptr.h b/build-support/compiler-workarounds/ostream-operator-nullptr.h deleted file mode 100644 index feb6b48b7..000000000 --- a/build-support/compiler-workarounds/ostream-operator-nullptr.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef OSTREAM_OPERATOR_NULLPTR_H -#define OSTREAM_OPERATOR_NULLPTR_H - -#include -#include - -namespace std -{ -inline std::ostream& -operator<<(std::ostream& os, std::nullptr_t) -{ - return os << "nullptr"; // whatever you want nullptr to show up as in the console -} -} // namespace std - -#endif // OSTREAM_OPERATOR_NULLPTR_H diff --git a/build-support/custom-modules/ns3-compiler-workarounds.cmake b/build-support/custom-modules/ns3-compiler-workarounds.cmake index 42e8d9dbe..f544ddff2 100644 --- a/build-support/custom-modules/ns3-compiler-workarounds.cmake +++ b/build-support/custom-modules/ns3-compiler-workarounds.cmake @@ -17,39 +17,7 @@ include(CheckCXXSourceCompiles) -# Clang 6, 7 and 8 shipped with incomplete C++17 features and do not handle -# ostream& operator<<(ostream& os, nullptr_t ptr) -# https://gitlab.com/nsnam/ns-3-dev/-/issues/730 -check_cxx_source_compiles( - " - #include - #include - inline std::ostream& operator << (std::ostream& os, std::nullptr_t ptr) - { - return os << \"nullptr\"; //whatever you want nullptr to show up as in the console - } - int main() - { - std::ostream os(NULL); - os << std::nullptr_t(); - return 0; - } - " - MISSING_OSTREAM_NULLPTR_OPERATOR -) - -if(${MISSING_OSTREAM_NULLPTR_OPERATOR}) - message( - ${HIGHLIGHTED_STATUS} - "Using compiler workaround: compiling in \"ostream& operator<<(ostream&, nullptr_t)\"" - ) - add_definitions( - -include - ${CMAKE_CURRENT_SOURCE_DIR}/build-support/compiler-workarounds/ostream-operator-nullptr.h - ) -endif() - -# Some compilers (e.g. GCC < 9.1 and Clang < 9) do not link +# Some compilers (e.g. GCC < 9.1) do not link # std::filesystem/std::experimental::filesystem by default. If the sample # program can be linked, it means it is indeed linked by default. Otherwise, we # link it manually. https://en.cppreference.com/w/cpp/filesystem