1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

temporary workaround for old GCC

This commit is contained in:
bolero-MURAKAMI 2018-12-25 17:11:15 +09:00
parent 8274f34db4
commit 6e8f686f72
6 changed files with 101 additions and 20 deletions

View file

@ -28,6 +28,7 @@
#include <sprout/algorithm/cxx14/swap_ranges.hpp>
#include <sprout/utility/forward.hpp>
#include <sprout/utility/swap.hpp>
#include <sprout/utility/string_view/string_view_fwd.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/identity.hpp>
#include <sprout/type_traits/enabler_if.hpp>
@ -885,6 +886,9 @@ namespace sprout {
SPROUT_EXPLICIT_CONVERSION SPROUT_NON_CONSTEXPR operator std::basic_string<T, Traits, Allocator>() const {
return std::basic_string<T, Traits, Allocator>(data(), size());
}
operator sprout::basic_string_view<T, Traits>() const SPROUT_NOEXCEPT {
return sprout::basic_string_view<T, Traits>(*this);
}
SPROUT_CXX14_CONSTEXPR void rangecheck(size_type i) const {
return i >= size() ? throw std::out_of_range("basic_string<>: index out of range")