mirror of
https://github.com/boostorg/static_string.git
synced 2026-01-19 04:42:12 +00:00
Apply the workaround in the previous commit to Clang 3.7 and 9-19, too
Reason: They have the same issue as GCC 9.
This commit is contained in:
@@ -289,7 +289,10 @@ using basic_string_view =
|
||||
// GCC 9 incorrectly rejects the pointer equality comparison in
|
||||
// ptr_in_range() in constant expressions. GCC 10 and later handle
|
||||
// it correctly.
|
||||
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ == 9)
|
||||
//
|
||||
// Clang 3.7 and 9-19 have the same issue.
|
||||
#if (defined(__GNUC__) && !defined(__clang__) && (__GNUC__ == 9)) \
|
||||
|| (defined(__clang__) && ((__clang_major__ == 3 && __clang_minor__ == 7) || ((__clang_major__ >= 9) && (__clang_major__ <= 19))))
|
||||
#define BOOST_STATIC_STRING_CONSTEXPR_PTR_CMP_BROKEN
|
||||
#endif
|
||||
|
||||
|
||||
@@ -618,7 +618,8 @@ testConstantEvaluation()
|
||||
a.replace(a.begin(), a.end(), a.begin(), a.end());
|
||||
a.replace(a.begin(), a.end(), {'a'});
|
||||
|
||||
#ifdef BOOST_STATIC_STRING_IS_CONST_EVAL
|
||||
#if defined(BOOST_STATIC_STRING_IS_CONST_EVAL) \
|
||||
&& !defined(BOOST_STATIC_STRING_CONSTEXPR_PTR_CMP_BROKEN)
|
||||
a.clear();
|
||||
a.replace(a.begin(), a.end(), "a");
|
||||
a.replace(a.begin(), a.end(), "a", 1);
|
||||
|
||||
Reference in New Issue
Block a user