mirror of
https://github.com/boostorg/static_string.git
synced 2025-07-29 12:07:42 +02:00
disable string_view overloads when type is convertible to basic_static_string
fixes #47
This commit is contained in:
@ -145,31 +145,36 @@ struct is_string_like<
|
||||
// directly and other convertible types such as std::string.
|
||||
// When no string_view type is available, then we check for the
|
||||
// data and size member functions, and use them directly for assignments.
|
||||
template<typename T, typename CharT, typename Traits, typename = void>
|
||||
// Types convertible to basic_static_string are not considered viewable
|
||||
// to prevent any ambiguity during overload resolution.
|
||||
template<std::size_t N, typename T, typename CharT, typename Traits, typename = void>
|
||||
struct enable_if_viewable { };
|
||||
|
||||
template<typename T, typename CharT, typename Traits>
|
||||
struct enable_if_viewable<T, CharT, Traits,
|
||||
template<std::size_t N, typename T, typename CharT, typename Traits>
|
||||
struct enable_if_viewable<N, T, CharT, Traits,
|
||||
typename std::enable_if<
|
||||
#if !defined(BOOST_STATIC_STRING_HAS_ANY_STRING_VIEW)
|
||||
is_string_like<T, CharT>::value
|
||||
is_string_like<T, CharT>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string<N, CharT, Traits>&>::value
|
||||
#elif defined(BOOST_STATIC_STRING_STANDALONE)
|
||||
std::is_convertible<const T&, std::basic_string_view<CharT, Traits>>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string<N, CharT, Traits>&>::value
|
||||
#else
|
||||
(
|
||||
std::is_convertible<const T&, basic_string_view<CharT, Traits>>::value ||
|
||||
std::is_convertible<const T&, core::basic_string_view<CharT>>::value
|
||||
) &&
|
||||
!std::is_convertible<const T&, const CharT*>::value
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string<N, CharT, Traits>&>::value
|
||||
#endif
|
||||
>::type>
|
||||
{
|
||||
using type = void;
|
||||
};
|
||||
|
||||
template<typename T, typename CharT, typename Traits>
|
||||
using enable_if_viewable_t = typename enable_if_viewable<T, CharT, Traits>::type;
|
||||
template<std::size_t N, typename T, typename CharT, typename Traits>
|
||||
using enable_if_viewable_t = typename enable_if_viewable<N, T, CharT, Traits>::type;
|
||||
|
||||
// The common string_view type used in private operations with enable_if_viewable_t
|
||||
// - T const& itself when no string_view type is available
|
||||
@ -1117,7 +1122,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
explicit
|
||||
@ -1137,7 +1142,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -1314,7 +1319,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value
|
||||
@endcode
|
||||
|
||||
@return `*this`
|
||||
@ -1325,7 +1331,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -1603,7 +1609,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value
|
||||
@endcode
|
||||
|
||||
@return `*this`
|
||||
@ -1614,7 +1621,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -1648,7 +1655,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value
|
||||
@endcode
|
||||
|
||||
@return `*this`
|
||||
@ -1664,7 +1672,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
basic_static_string&
|
||||
@ -2594,7 +2602,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@param index The index to insert at.
|
||||
@param t The string to insert from.
|
||||
@ -2604,7 +2613,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -2635,7 +2644,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const_pointer>::value`.
|
||||
!std::is_convertible<const T&, const_pointer>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return `*this`
|
||||
|
||||
@ -2651,7 +2661,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3006,7 +3016,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<T const&, string_view>::value &&
|
||||
!std::is_convertible<T const&, char const*>::value
|
||||
!std::is_convertible<T const&, char const*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value
|
||||
@endcode
|
||||
|
||||
@return `*this`
|
||||
@ -3017,7 +3028,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3043,7 +3054,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<T const&, string_view>::value &&
|
||||
!std::is_convertible<T const&, char const*>::value
|
||||
!std::is_convertible<T const&, char const*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value
|
||||
@endcode
|
||||
|
||||
@return `*this`
|
||||
@ -3059,7 +3071,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3181,7 +3193,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<T const&, string_view>::value &&
|
||||
!std::is_convertible<T const&, char const*>::value
|
||||
!std::is_convertible<T const&, char const*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value
|
||||
@endcode
|
||||
|
||||
@return `*this`
|
||||
@ -3192,7 +3205,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3440,7 +3453,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const_pointer>::value.
|
||||
!std::is_convertible<const T&, const_pointer>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value.
|
||||
@endcode
|
||||
|
||||
@return The result of lexicographically comparing `s` and the string.
|
||||
@ -3449,7 +3463,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3484,7 +3498,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const_pointer>::value.
|
||||
!std::is_convertible<const T&, const_pointer>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value.
|
||||
@endcode
|
||||
|
||||
@return The result of lexicographically comparing `s` and `sub`.
|
||||
@ -3497,7 +3512,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3535,7 +3550,8 @@ public:
|
||||
|
||||
@code
|
||||
std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const_pointer>::value.
|
||||
!std::is_convertible<const T&, const_pointer>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value.
|
||||
@endcode
|
||||
|
||||
@return The result of lexicographically comparing `sub1` and `sub2`.
|
||||
@ -3552,7 +3568,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3867,7 +3883,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return `*this`
|
||||
|
||||
@ -3880,7 +3897,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -3913,7 +3930,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return `*this`
|
||||
|
||||
@ -3930,7 +3948,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -4129,7 +4147,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return `*this`
|
||||
|
||||
@ -4142,7 +4161,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -4392,7 +4411,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return The lowest index `idx` greater than or equal to `pos`
|
||||
where each element of `{sv.begin(), sv.end())` is equal to
|
||||
@ -4405,7 +4425,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -4549,7 +4569,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return The highest index `idx` less than or equal to `pos`
|
||||
where each element of `{sv.begin(), sv.end())` is equal to
|
||||
@ -4562,7 +4583,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -4702,7 +4723,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return The index corrosponding to the first occurrence of
|
||||
any of the characters in `{sv.begin(), sv.end())` within
|
||||
@ -4714,7 +4736,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -4849,7 +4871,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return The index corrosponding to the last occurrence of
|
||||
any of the characters in `{sv.begin(), sv.end())` within
|
||||
@ -4861,7 +4884,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -4995,7 +5018,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return The index corrosponding to the first occurrence of
|
||||
a character that is not in `{sv.begin(), sv.end())` within
|
||||
@ -5007,7 +5031,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5140,7 +5164,8 @@ public:
|
||||
@par Constraints
|
||||
|
||||
`std::is_convertible<const T&, string_view>::value &&
|
||||
!std::is_convertible<const T&, const CharT*>::value`.
|
||||
!std::is_convertible<const T&, const CharT*>::value &&
|
||||
!std::is_convertible<const T&, const basic_static_string&>::value`.
|
||||
|
||||
@return The index corrosponding to the last occurrence of
|
||||
a character that is not in `{sv.begin(), sv.end())` within
|
||||
@ -5152,7 +5177,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5284,7 +5309,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5348,7 +5373,7 @@ public:
|
||||
*/
|
||||
template<typename T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5617,7 +5642,7 @@ operator==(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5635,7 +5660,7 @@ operator==(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5679,7 +5704,7 @@ operator!=(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5697,7 +5722,7 @@ operator!=(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5741,7 +5766,7 @@ operator<(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5759,7 +5784,7 @@ operator<(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5803,7 +5828,7 @@ operator<=(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5821,7 +5846,7 @@ operator<=(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5865,7 +5890,7 @@ operator>(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5883,7 +5908,7 @@ operator>(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5928,7 +5953,7 @@ operator>=(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
@ -5946,7 +5971,7 @@ operator>=(
|
||||
|
||||
template<std::size_t N, typename CharT, typename Traits, class T
|
||||
#ifndef BOOST_STATIC_STRING_DOCS
|
||||
, typename = detail::enable_if_viewable_t<T, CharT, Traits>
|
||||
, typename = detail::enable_if_viewable_t<N, T, CharT, Traits>
|
||||
#endif
|
||||
>
|
||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||
|
@ -7393,6 +7393,15 @@ testOperatorPlus()
|
||||
}
|
||||
}
|
||||
|
||||
// issue 47
|
||||
struct issue_47 : static_string<32>
|
||||
{
|
||||
bool compare(const issue_47& other) const
|
||||
{
|
||||
return *this < other;
|
||||
}
|
||||
};
|
||||
|
||||
int
|
||||
runTests()
|
||||
{
|
||||
|
Reference in New Issue
Block a user