Fix C++17 build

This commit is contained in:
rexy712 2022-06-22 16:43:34 -07:00
parent 3d17d3ec8c
commit 37e02ca871
3 changed files with 8 additions and 13 deletions

View File

@ -18,7 +18,7 @@ option(BUILD_TESTS "Enable testing" OFF)
option(BUILD_HEADER_ONLY "Enable header only build" OFF)
mark_as_advanced(ENABLE_PROFILING)
set(LIBREXY_PUBLIC_HEADERS "include/rexy/rexy.hpp" "include/rexy/algorithm.hpp" "include/rexy/algorithm.tpp" "include/rexy/utility.hpp" "include/rexy/basic_string_hash.hpp" "include/rexy/hash.hpp" "include/rexy/string_view_hash.hpp" "include/rexy/string_hash.hpp" "include/rexy/mpmc_queue.hpp" "include/rexy/mpmc_queue.tpp" "include/rexy/traits.hpp" "include/rexy/steal.hpp" "include/rexy/expression.hpp" "include/rexy/string_base.hpp" "include/rexy/string.hpp" "include/rexy/string_base.tpp" "include/rexy/allocator.hpp" "include/rexy/meta.hpp" "include/rexy/buffer.hpp" "include/rexy/buffer.tpp" "include/rexy/debug_print.hpp" "include/rexy/deferred.hpp" "include/rexy/enum_traits.hpp" "include/rexy/storage_for.hpp" "include/rexy/storage_for.tpp" "include/rexy/visitor.hpp" "include/rexy/string_view.hpp" "include/rexy/string_view.tpp")
set(LIBREXY_PUBLIC_HEADERS "include/rexy/rexy.hpp" "include/rexy/algorithm.hpp" "include/rexy/algorithm.tpp" "include/rexy/utility.hpp" "include/rexy/basic_string_hash.hpp" "include/rexy/hash.hpp" "include/rexy/string_view_hash.hpp" "include/rexy/string_hash.hpp" "include/rexy/mpmc_queue.hpp" "include/rexy/mpmc_queue.tpp" "include/rexy/traits.hpp" "include/rexy/steal.hpp" "include/rexy/expression.hpp" "include/rexy/string_base.hpp" "include/rexy/string.hpp" "include/rexy/string_base.tpp" "include/rexy/allocator.hpp" "include/rexy/meta.hpp" "include/rexy/buffer.hpp" "include/rexy/buffer.tpp" "include/rexy/debug_print.hpp" "include/rexy/deferred.hpp" "include/rexy/enum_traits.hpp" "include/rexy/storage_for.hpp" "include/rexy/storage_for.tpp" "include/rexy/visitor.hpp" "include/rexy/string_view.hpp" "include/rexy/string_view.tpp" "include/rexy/format.hpp" "include/rexy/format.tpp")
if(BUILD_HEADER_ONLY)
set(LIBREXY_BUILT_LIBRARY_HEADERS "")

View File

@ -28,7 +28,7 @@ namespace rexy{
#ifdef __cpp_concepts
#include "cpp20/string_base.hpp"
#else
#include "cpp20/string_base.tpp"
#include "cpp17/string_base.hpp"
#endif
#endif

View File

@ -353,18 +353,13 @@ namespace rexy{
struct insert_adapter{
value_type val;
constexpr insert_adapter& operator++(void)noexcept{
return *this;
}
constexpr insert_adapter operator++(int)noexcept{
return *this;
}
constexpr value_type operator*(void)const noexcept{
return val;
}
constexpr insert_adapter& operator++(void)noexcept{return *this;}
constexpr insert_adapter operator++(int)noexcept{return *this;}
constexpr value_type operator*(void)const noexcept{return val;}
constexpr bool operator==(const insert_adapter& other)const{return val == other.val;}
constexpr bool operator!=(const insert_adapter& other)const{return val == other.val;}
constexpr bool operator==(const insert_adapter& other)const = default;
constexpr bool operator!=(const insert_adapter& other)const = default;
};
return _insert_impl(pos, insert_adapter{v}, insert_count);