Skip to content

Commit cdac01f

Browse files
node-handle doc
1 parent d1dfb7f commit cdac01f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

libcxx/include/__node_handle

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,7 @@ struct __map_node_handle_specifics {
180180
using key_type = __remove_const_t<typename _NodeType::__node_value_type::first_type>;
181181
using mapped_type = typename _NodeType::__node_value_type::second_type;
182182

183-
/*
184-
As this method this->key() returns a non-const reference
185-
to the `key_type` which is const inside `node_type`.
186-
This means that we can't make this member method constexpr until CWG2514 is resolved.
187-
This disallows making the member function constexpr.
188-
189-
More here:
190-
* https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3372r3.html#node-handle-key
191-
* https://cplusplus.github.io/CWG/issues/2514.html
192-
*/
183+
// This method is not constexpr as per the standard.
193184
_LIBCPP_HIDE_FROM_ABI key_type& key() const {
194185
return const_cast<key_type&>(static_cast<_Derived const*>(this)->__ptr_->__get_value().first);
195186
}

0 commit comments

Comments
 (0)