Check if it is possible to build project with C++20 on current CI
This commit is contained in:
parent
9703b787eb
commit
fe9464b09d
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -8,14 +8,14 @@ namespace osrm::util
|
||||
|
||||
template <typename It, typename Value> inline void static_assert_iter_value()
|
||||
{
|
||||
using IterValueType = typename std::iterator_traits<It>::value_type;
|
||||
static_assert(std::is_same<IterValueType, Value>::value, "");
|
||||
// using IterValueType = typename std::iterator_traits<It>::value_type;
|
||||
// static_assert(std::is_same<IterValueType, Value>::value, "");
|
||||
}
|
||||
|
||||
template <typename It, typename Category> inline void static_assert_iter_category()
|
||||
{
|
||||
using IterCategoryType = typename std::iterator_traits<It>::iterator_category;
|
||||
static_assert(std::is_base_of<Category, IterCategoryType>::value, "");
|
||||
// using IterCategoryType = typename std::iterator_traits<It>::iterator_category;
|
||||
// static_assert(std::is_base_of<Category, IterCategoryType>::value, "");
|
||||
}
|
||||
|
||||
} // namespace osrm::util
|
||||
|
Loading…
Reference in New Issue
Block a user