@@ -1037,12 +1037,7 @@ public:
1037
1037
if constexpr (
1038
1038
integral_constant<bool , is_copy_constructible<decltype (__value.first )>::value >()
1039
1039
) {
1040
- // static_assert(std::same_as_v<decltype(__value.first), double>);
1041
- // __emplace_hint_unique(__p, std::move(__value.first), std::move(__value.second));
1042
-
1043
- __sfinae_call_emplace_hint_unique (__p, std::move (__value),
1044
- integral_constant<bool , is_copy_constructible<decltype (__value.first )>::value >()
1045
- );
1040
+ __emplace_hint_unique (__p, std::move (__value.first ), std::move (__value.second ));
1046
1041
} else
1047
1042
#endif
1048
1043
{
@@ -1274,12 +1269,10 @@ private:
1274
1269
error: no matching constructor for initialization of '__get_node_value_type_t<value_type>' (aka 'std::pair<const MoveOnly, MoveOnly>')
1275
1270
# | 1225 | __get_node_value_type_t<value_type> __tmp(__rhs.first, __rhs.second);
1276
1271
*/
1277
- if constexpr (integral_constant<bool , is_copy_constructible_v<_From> >()) {
1278
- // __move_from_value_type(__lhs, __rhs
1279
- // , integral_constant<bool, is_copy_constructible_v<_From> >()
1280
- // );
1281
1272
1282
- // TODO: narrow it to "_From.first"
1273
+ if constexpr (
1274
+ integral_constant<bool , is_copy_constructible<decltype (__rhs.first )>::value >()
1275
+ ){
1283
1276
// if constexpr (integral_constant<bool, is_copy_constructible_v<_From> >()) {
1284
1277
// we use copy, and not "move" as the constraint
1285
1278
// because we can NOT move from `const key_type`, which is how `value_type` is defined
@@ -1293,7 +1286,6 @@ error: no matching constructor for initialization of '__get_node_value_type_t<va
1293
1286
1294
1287
// note: this does not work for `const MoveOnly` keys at constexpr time
1295
1288
1296
-
1297
1289
__node_allocator& __na = __node_alloc ();
1298
1290
__node_traits::destroy (__na, std::addressof (__lhs));
1299
1291
@@ -1303,19 +1295,6 @@ error: no matching constructor for initialization of '__get_node_value_type_t<va
1303
1295
__node_traits::construct (__na, std::addressof (__lhs), std::move (__tmp));
1304
1296
1305
1297
1306
- // } else {
1307
-
1308
- // (void)__lhs;
1309
- // (void)__rhs;
1310
- // static_assert(false, "Can not move from a pair<const T, U>");
1311
- // TODO: how do I flag this code to NOT run at compile time?
1312
- // 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
1313
-
1314
- // }
1315
-
1316
-
1317
-
1318
-
1319
1298
} else
1320
1299
#endif
1321
1300
{
0 commit comments