wip
This commit is contained in:
parent
400732a76f
commit
1c3c56bbc6
@ -1,6 +1,7 @@
|
||||
#ifndef OSRM_STATIC_ASSERT_HPP
|
||||
#define OSRM_STATIC_ASSERT_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
namespace osrm::util
|
||||
@ -8,14 +9,13 @@ 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, "");
|
||||
static_assert(std::is_same_v<std::iter_value_t<It>, 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