Skip to content

Commit c8e907f

Browse files
still correct failures with cleanup
1 parent ee0a6b5 commit c8e907f

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

libcxx/include/__tree

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,12 +1037,7 @@ public:
10371037
if constexpr (
10381038
integral_constant<bool, is_copy_constructible<decltype(__value.first)>::value >()
10391039
) {
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));
10461041
} else
10471042
#endif
10481043
{
@@ -1274,12 +1269,10 @@ private:
12741269
error: no matching constructor for initialization of '__get_node_value_type_t<value_type>' (aka 'std::pair<const MoveOnly, MoveOnly>')
12751270
# | 1225 | __get_node_value_type_t<value_type> __tmp(__rhs.first, __rhs.second);
12761271
*/
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-
// );
12811272

1282-
// TODO: narrow it to "_From.first"
1273+
if constexpr (
1274+
integral_constant<bool, is_copy_constructible<decltype(__rhs.first)>::value >()
1275+
){
12831276
// if constexpr (integral_constant<bool, is_copy_constructible_v<_From> >()) {
12841277
// we use copy, and not "move" as the constraint
12851278
// 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
12931286

12941287
// note: this does not work for `const MoveOnly` keys at constexpr time
12951288

1296-
12971289
__node_allocator& __na = __node_alloc();
12981290
__node_traits::destroy(__na, std::addressof(__lhs));
12991291

@@ -1303,19 +1295,6 @@ error: no matching constructor for initialization of '__get_node_value_type_t<va
13031295
__node_traits::construct(__na, std::addressof(__lhs), std::move(__tmp));
13041296

13051297

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-
13191298
} else
13201299
#endif
13211300
{

0 commit comments

Comments
 (0)