Skip to content

Commit c5d73dd

Browse files
Avoid creating a __tmp
1 parent 80b2f06 commit c5d73dd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

libcxx/include/__tree

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,11 +1356,7 @@ private:
13561356
__assign_value__sfinae(true_type, __get_node_value_type_t<value_type>& __lhs, _From&& __rhs) {
13571357
__node_allocator& __na = __node_alloc();
13581358
__node_traits::destroy(__na, std::addressof(__lhs));
1359-
1360-
using __node_value_type = __get_node_value_type_t<value_type>;
1361-
__node_value_type __tmp(__rhs.first, __rhs.second);
1362-
1363-
__node_traits::construct(__na, std::addressof(__lhs), std::move(__tmp));
1359+
__node_traits::construct(__na, std::addressof(__lhs), __rhs.first, __rhs.second);
13641360
}
13651361

13661362
template <class _From, class _ValueT = _Tp, __enable_if_t<__is_tree_value_type_v<_ValueT>, int> = 0>

0 commit comments

Comments
 (0)