mirror of
https://github.com/boostorg/static_string.git
synced 2025-07-29 20:17:35 +02:00
Remove __builtin_constant_p
This commit is contained in:
@ -60,7 +60,6 @@
|
||||
#define BOOST_STATIC_STRING_NODISCARD
|
||||
#endif
|
||||
|
||||
|
||||
// MSVC doesn't define __cplusplus by default
|
||||
#ifdef _MSVC_LANG
|
||||
#define BOOST_STATIC_STRING_STANDARD_VERSION _MSVC_LANG
|
||||
@ -168,12 +167,9 @@ defined(__clang__) && \
|
||||
// that cannot use the library comparison function
|
||||
// objects at all in constant expresssions. In these
|
||||
// cases, we use whatever will make more constexpr work.
|
||||
#if defined(__clang__)
|
||||
#if defined(__GLIBCXX__) && ((__GLIBCXX__ > 20181206 && __GLIBCXX__ <= 20190812))
|
||||
#if defined(__clang__) && defined(__GLIBCXX__) && \
|
||||
((__GLIBCXX__ >= 20180726 && __GLIBCXX__ <= 20190812))
|
||||
#define BOOST_STATIC_STRING_NO_PTR_COMP_FUNCTIONS
|
||||
#elif BOOST_STATIC_STRING_HAS_BUILTIN(__builtin_constant_p) || defined(BOOST_STATIC_STRING_IS_CONST_EVAL)
|
||||
#define BOOST_STATIC_STRING_NO_PTR_COMP_FUNCTIONS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
@ -627,15 +627,6 @@ is_inside(
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
#elif defined(__clang__) && BOOST_STATIC_STRING_HAS_BUILTIN(__builtin_constant_p)
|
||||
// We can also try using __builtin_constant_p
|
||||
if (__builtin_constant_p((ptr, src_first, src_last)))
|
||||
{
|
||||
for (; src_first != src_last; ++src_first)
|
||||
if (src_first == ptr)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
// If library comparison functions don't work, and
|
||||
// we cannot use any of the above, we can use
|
||||
|
Reference in New Issue
Block a user