diff --git a/include/meta/meta_fwd.hpp b/include/meta/meta_fwd.hpp index cc64ce263b..a2f5e6ff8b 100644 --- a/include/meta/meta_fwd.hpp +++ b/include/meta/meta_fwd.hpp @@ -147,7 +147,7 @@ #if __cpp_concepts <= 201507L #define META_CONCEPT concept bool // TS concepts subsumption barrier for atomic expressions -#define META_CONCEPT_BARRIER(...) ::meta::detail::bool_<__VA_ARGS__> +#define META_CONCEPT_BARRIER(...) ::meta::detail::barrier<__VA_ARGS__> #else #define META_CONCEPT concept #define META_CONCEPT_BARRIER(...) __VA_ARGS__ @@ -267,7 +267,7 @@ namespace meta namespace detail { template - META_INLINE_VAR constexpr bool bool_ = B; + META_INLINE_VAR constexpr bool barrier = B; template struct require_constant; // not defined } diff --git a/include/range/v3/detail/config.hpp b/include/range/v3/detail/config.hpp index b956f11eec..81f06553d4 100644 --- a/include/range/v3/detail/config.hpp +++ b/include/range/v3/detail/config.hpp @@ -210,6 +210,8 @@ namespace ranges #define RANGES_DIAGNOSTIC_IGNORE_DIVIDE_BY_ZERO RANGES_DIAGNOSTIC_IGNORE(4723 4724) #define RANGES_DIAGNOSTIC_IGNORE_UNSIGNED_MATH RANGES_DIAGNOSTIC_IGNORE(4146) #define RANGES_DIAGNOSTIC_IGNORE_TRUNCATION RANGES_DIAGNOSTIC_IGNORE(4244) +#define RANGES_DIAGNOSTIC_IGNORE_MULTIPLE_ASSIGNMENT_OPERATORS \ + RANGES_DIAGNOSTIC_IGNORE(4522) #define RANGES_CXX_VER _MSVC_LANG @@ -309,6 +311,7 @@ namespace ranges #define RANGES_DIAGNOSTIC_IGNORE_DIVIDE_BY_ZERO #define RANGES_DIAGNOSTIC_IGNORE_UNSIGNED_MATH #define RANGES_DIAGNOSTIC_IGNORE_TRUNCATION +#define RANGES_DIAGNOSTIC_IGNORE_MULTIPLE_ASSIGNMENT_OPERATORS #define RANGES_WORKAROUND_CWG_1554 #ifdef __clang__ @@ -349,6 +352,7 @@ namespace ranges #define RANGES_DIAGNOSTIC_IGNORE_DIVIDE_BY_ZERO #define RANGES_DIAGNOSTIC_IGNORE_UNSIGNED_MATH #define RANGES_DIAGNOSTIC_IGNORE_TRUNCATION +#define RANGES_DIAGNOSTIC_IGNORE_MULTIPLE_ASSIGNMENT_OPERATORS #endif // Configuration via feature-test macros, with fallback to __cplusplus diff --git a/include/range/v3/iterator/basic_iterator.hpp b/include/range/v3/iterator/basic_iterator.hpp index c664cc098c..bf27ab6a7f 100644 --- a/include/range/v3/iterator/basic_iterator.hpp +++ b/include/range/v3/iterator/basic_iterator.hpp @@ -32,6 +32,9 @@ #include #include +RANGES_DIAGNOSTIC_PUSH +RANGES_DIAGNOSTIC_IGNORE_MULTIPLE_ASSIGNMENT_OPERATORS + namespace ranges { /// \addtogroup group-iterator Iterator @@ -935,4 +938,6 @@ namespace std } // namespace std /// \endcond +RANGES_DIAGNOSTIC_POP + #endif diff --git a/test/experimental/utility/generator.cpp b/test/experimental/utility/generator.cpp index 42900022dc..084b5ce10b 100644 --- a/test/experimental/utility/generator.cpp +++ b/test/experimental/utility/generator.cpp @@ -58,10 +58,10 @@ struct coro_fn CPP_template(typename V)( requires ranges::input_range && ranges::view_ && - is_copy_constructible_or_ref>()) + (is_copy_constructible_or_ref>())) static generator_for impl(V v) { - if /* constexpr */ (ranges::sized_range) + if(RANGES_CONSTEXPR_IF(ranges::sized_range)) co_await static_cast((std::size_t)ranges::distance(v)); auto first = ranges::begin(v); auto const last = ranges::end(v); @@ -126,9 +126,9 @@ ranges::experimental::generator iota_generator(T t) } CPP_template(class T, class S)( - requires ranges::weakly_incrementable && + requires (ranges::weakly_incrementable && ranges::detail::weakly_equality_comparable_with_ && - (!ranges::sized_sentinel_for) && !(ranges::integral && ranges::integral)) + !ranges::sized_sentinel_for && !(ranges::integral && ranges::integral))) ranges::experimental::generator iota_generator(T t, S const s) { for (; t != s; ++t) @@ -165,7 +165,7 @@ meta::invoke< ranges::indirect_result_t>> transform(V view, F f) { - if /* constexpr */ (ranges::sized_range) + if(RANGES_CONSTEXPR_IF(ranges::sized_range)) co_await static_cast((std::size_t) ranges::distance(view)); RANGES_FOR(auto &&i, view) co_yield ranges::invoke(f, i);