Skip to content

Commit d8d6278

Browse files
add why sfinae
1 parent 27604a5 commit d8d6278

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libcxx/include/__tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,11 @@ public:
10291029
>
10301030
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
10311031
__sfinae_call_emplace_hint_unique(const_iterator __p, __get_node_value_type_t<_Tp>&& __value, false_type) {
1032+
// TODO:
1033+
// Using sfinae was thought to be needed, to avoid "instantiation" of a copy constructor
1034+
// but that original idea fell through, so these __sfinae_* overloads could very likely be collpased into
1035+
// if constexpr {...} else {...} anyway.
1036+
10321037
// __emplace_hint_unique(__p, std::move(__value.first), std::move(__value.second));
10331038
// static_assert(false, "Can not emplace during constant evaluation if the key is `const MoveOnly` ");
10341039
// TODO: somehow flag this code if it executes during compile time

0 commit comments

Comments
 (0)