@@ -1034,7 +1034,9 @@ public:
10341034 // fails here for move_alloc.pass.cpp
10351035
10361036 #if _LIBCPP_STD_VER >= 26
1037- if (__libcpp_is_constant_evaluated ()) {
1037+ if constexpr (
1038+ integral_constant<bool , is_copy_constructible<decltype (__value.first )>::value >()
1039+ ) {
10381040 // static_assert(std::same_as_v<decltype(__value.first), double>);
10391041 // __emplace_hint_unique(__p, std::move(__value.first), std::move(__value.second));
10401042
@@ -1272,13 +1274,13 @@ private:
12721274error: no matching constructor for initialization of '__get_node_value_type_t<value_type>' (aka 'std::pair<const MoveOnly, MoveOnly>')
12731275# | 1225 | __get_node_value_type_t<value_type> __tmp(__rhs.first, __rhs.second);
12741276 */
1275- if ( __libcpp_is_constant_evaluated ()) {
1277+ if constexpr (integral_constant< bool , is_copy_constructible_v<_From> > ()) {
12761278 // __move_from_value_type(__lhs, __rhs
12771279 // , integral_constant<bool, is_copy_constructible_v<_From> >()
12781280 // );
12791281
12801282 // TODO: narrow it to "_From.first"
1281- if constexpr (integral_constant<bool , is_copy_constructible_v<_From> >()) {
1283+ // if constexpr (integral_constant<bool, is_copy_constructible_v<_From> >()) {
12821284 // we use copy, and not "move" as the constraint
12831285 // because we can NOT move from `const key_type`, which is how `value_type` is defined
12841286 // atleast for map
@@ -1301,15 +1303,15 @@ error: no matching constructor for initialization of '__get_node_value_type_t<va
13011303 __node_traits::construct (__na, std::addressof (__lhs), std::move (__tmp));
13021304
13031305
1304- } else {
1306+ // } else {
13051307
13061308 // (void)__lhs;
13071309 // (void)__rhs;
1308- static_assert (false , " Can not move from a pair<const T, U>" );
1310+ // static_assert(false, "Can not move from a pair<const T, U>");
13091311 // TODO: how do I flag this code to NOT run at compile time?
13101312 // Using static_assert means this can't compile _at all_, regardless of whether this code is actually going to execute at compile time or not
13111313
1312- }
1314+ // }
13131315
13141316
13151317
0 commit comments