diff --git a/CMakeLists.txt b/CMakeLists.txt index fb135888b..c81176f9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++20") + + if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND NOT MSVC_IDE) message(FATAL_ERROR "In-source builds are not allowed. Please create a directory and run cmake from there, passing the path to this source directory as the last argument. diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index bdea06cef..2871f330c 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -92,3 +92,4 @@ no_warning(shorten-64-to-32) no_warning(padded) no_warning(missing-noreturn) no_warning(deprecated-comma-subscript) +np_warning(comma-subscript) diff --git a/include/util/static_assert.hpp b/include/util/static_assert.hpp index 234b26391..f1e24c881 100644 --- a/include/util/static_assert.hpp +++ b/include/util/static_assert.hpp @@ -8,14 +8,14 @@ namespace osrm::util template inline void static_assert_iter_value() { - using IterValueType = typename std::iterator_traits::value_type; - static_assert(std::is_same::value, ""); + // using IterValueType = typename std::iterator_traits::value_type; + // static_assert(std::is_same::value, ""); } template inline void static_assert_iter_category() { - using IterCategoryType = typename std::iterator_traits::iterator_category; - static_assert(std::is_base_of::value, ""); + // using IterCategoryType = typename std::iterator_traits::iterator_category; + // static_assert(std::is_base_of::value, ""); } } // namespace osrm::util