@@ -174,40 +174,17 @@ struct __set_node_handle_specifics {
174
174
_LIBCPP_HIDE_FROM_ABI value_type& value () const { return static_cast <_Derived const *>(this )->__ptr_ ->__get_value (); }
175
175
};
176
176
177
- template <class , class >
178
- struct __hash_value_type ;
179
-
180
177
template <class _NodeType , class _Derived >
181
178
struct __map_node_handle_specifics {
182
- template <class _Tp >
183
- struct __get_type {
184
- using key_type = __remove_const_t <typename _Tp::first_type>;
185
- using mapped_type = typename _Tp::second_type;
186
- };
187
-
188
- template <class _Key , class _Mapped >
189
- struct __get_type <__hash_value_type<_Key, _Mapped> > {
190
- using key_type = _Key;
191
- using mapped_type = _Mapped;
192
- };
193
-
194
- using key_type = typename __get_type<typename _NodeType::__node_value_type>::key_type;
195
- using mapped_type = typename __get_type<typename _NodeType::__node_value_type>::mapped_type;
179
+ using key_type = __remove_const_t <typename _NodeType::__node_value_type::first_type>;
180
+ using mapped_type = typename _NodeType::__node_value_type::second_type;
196
181
197
182
_LIBCPP_HIDE_FROM_ABI key_type& key () const {
198
- if constexpr (__is_specialization_v<typename _NodeType::__node_value_type, __hash_value_type>) {
199
- return static_cast <_Derived const *>(this )->__ptr_ ->__get_value ().__ref ().first ;
200
- } else {
201
- return const_cast <key_type&>(static_cast <_Derived const *>(this )->__ptr_ ->__get_value ().first );
202
- }
183
+ return const_cast <key_type&>(static_cast <_Derived const *>(this )->__ptr_ ->__get_value ().first );
203
184
}
204
185
205
186
_LIBCPP_HIDE_FROM_ABI mapped_type& mapped () const {
206
- if constexpr (__is_specialization_v<typename _NodeType::__node_value_type, __hash_value_type>) {
207
- return static_cast <_Derived const *>(this )->__ptr_ ->__get_value ().__ref ().second ;
208
- } else {
209
- return static_cast <_Derived const *>(this )->__ptr_ ->__get_value ().second ;
210
- }
187
+ return static_cast <_Derived const *>(this )->__ptr_ ->__get_value ().second ;
211
188
}
212
189
};
213
190
0 commit comments