#include <initializer_list>
#endif
-#if __cplusplus >= 201703L
+#include <bits/version.h>
+
+#ifdef __glibcxx_string_view // >= C++17
# include <string_view>
#endif
# include <charconv>
#endif
-#include <bits/version.h>
#if ! _GLIBCXX_USE_CXX11_ABI
# include "cow_string.h"
return __p;
}
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
// A helper type for avoiding boiler-plate.
typedef basic_string_view<_CharT, _Traits> __sv_type;
#endif
}
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Construct string from a substring of a string_view.
* @param __t Source object convertible to string view.
}
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Set value to string constructed from a string_view.
* @param __svt An object convertible to string_view.
{ return this->append(__l.begin(), __l.size()); }
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Append a string_view.
* @param __svt An object convertible to string_view to be appended.
append(_InputIterator __first, _InputIterator __last)
{ return this->replace(end(), end(), __first, __last); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view
/**
* @brief Append a string_view.
* @param __svt An object convertible to string_view to be appended.
}
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Set value from a string_view.
* @param __svt The source object convertible to string_view.
return iterator(_M_data() + __pos);
}
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Insert a string_view.
* @param __pos Position in string to insert at.
{ return this->replace(__i1, __i2, __l.begin(), __l.size()); }
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Replace range of characters with string_view.
* @param __pos The position to replace at.
_GLIBCXX_NOEXCEPT
{ return this->find(__str.data(), __pos, __str.size()); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find position of a string_view.
* @param __svt The object convertible to string_view to locate.
_GLIBCXX_NOEXCEPT
{ return this->rfind(__str.data(), __pos, __str.size()); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find last position of a string_view.
* @param __svt The object convertible to string_view to locate.
_GLIBCXX_NOEXCEPT
{ return this->find_first_of(__str.data(), __pos, __str.size()); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find position of a character of a string_view.
* @param __svt An object convertible to string_view containing
_GLIBCXX_NOEXCEPT
{ return this->find_last_of(__str.data(), __pos, __str.size()); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find last position of a character of string.
* @param __svt An object convertible to string_view containing
_GLIBCXX_NOEXCEPT
{ return this->find_first_not_of(__str.data(), __pos, __str.size()); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find position of a character not in a string_view.
* @param __svt A object convertible to string_view containing
_GLIBCXX_NOEXCEPT
{ return this->find_last_not_of(__str.data(), __pos, __str.size()); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find last position of a character not in a string_view.
* @param __svt An object convertible to string_view containing
return __r;
}
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Compare to a string_view.
* @param __svt An object convertible to string_view to compare against.
constexpr
#endif
inline wstring
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
__to_wstring_numeric(string_view __s)
#else
__to_wstring_numeric(const string& __s)
} // inline namespace literals
#endif // __glibcxx_string_udls
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_variant // >= C++17
namespace __detail::__variant
{
template<typename> struct _Never_valueless_alt; // see <variant>
_S_empty_rep() _GLIBCXX_NOEXCEPT
{ return _Rep::_S_empty_rep(); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
// A helper type for avoiding boiler-plate.
typedef basic_string_view<_CharT, _Traits> __sv_type;
: _M_dataplus(_S_construct(__beg, __end, __a), __a)
{ }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Construct string from a substring of a string_view.
* @param __t Source object convertible to string view.
}
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Set value to string constructed from a string_view.
* @param __svt An object convertible to string_view.
{ return this->append(__l.begin(), __l.size()); }
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Append a string_view.
* @param __svt The object convertible to string_view to be appended.
append(_InputIterator __first, _InputIterator __last)
{ return this->replace(_M_iend(), _M_iend(), __first, __last); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Append a string_view.
* @param __svt The object convertible to string_view to be appended.
{ return this->assign(__l.begin(), __l.size()); }
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Set value from a string_view.
* @param __svt The source object convertible to string_view.
return iterator(_M_data() + __pos);
}
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Insert a string_view.
* @param __pos Position in string to insert at.
{ return this->replace(__i1, __i2, __l.begin(), __l.end()); }
#endif // C++11
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Replace range of characters with string_view.
* @param __pos The position to replace at.
size_type
find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT;
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find position of a string_view.
* @param __svt The object convertible to string_view to locate.
size_type
rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT;
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find last position of a string_view.
* @param __svt The object convertible to string_view to locate.
find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT
{ return this->find(__c, __pos); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find position of a character of a string_view.
* @param __svt An object convertible to string_view containing
find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT
{ return this->rfind(__c, __pos); }
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find last position of a character of string.
* @param __svt An object convertible to string_view containing
find_first_not_of(_CharT __c, size_type __pos = 0) const
_GLIBCXX_NOEXCEPT;
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find position of a character not in a string_view.
* @param __svt An object convertible to string_view containing
find_last_not_of(_CharT __c, size_type __pos = npos) const
_GLIBCXX_NOEXCEPT;
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Find last position of a character not in a string_view.
* @param __svt An object convertible to string_view containing
return __r;
}
-#if __cplusplus >= 201703L
+#ifdef __glibcxx_string_view // >= C++17
/**
* @brief Compare to a string_view.
* @param __svt An object convertible to string_view to compare against.