File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1277,7 +1277,13 @@ error: no matching constructor for initialization of '__get_node_value_type_t<va
12771277 // , integral_constant<bool, is_copy_constructible_v<_From> >()
12781278 // );
12791279
1280+ // TODO: narrow it to "_From.first"
12801281 if constexpr (integral_constant<bool , is_copy_constructible_v<_From> >()) {
1282+ // we use copy, and not "move" as the constraint
1283+ // because we can NOT move from `const key_type`, which is how `value_type` is defined
1284+ // atleast for map
1285+ // typedef pair<const key_type, mapped_type> value_type;
1286+ // so we must copy it
12811287
12821288 // const_cast is not allowed at constexpr time.
12831289 // we get around this by deleting __lhs and creating a new node in-place
@@ -1299,7 +1305,7 @@ error: no matching constructor for initialization of '__get_node_value_type_t<va
12991305
13001306 // (void)__lhs;
13011307 // (void)__rhs;
1302- // static_assert(false, "Can not move from a pair<const T, U>");
1308+ static_assert (false , " Can not move from a pair<const T, U>" );
13031309 // TODO: how do I flag this code to NOT run at compile time?
13041310 // 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
13051311
You can’t perform that action at this time.
0 commit comments