forked from boostorg/unordered
restricted erase generic arg as per C++23 requirements
(hopefully fixes test errors in VS2015)
This commit is contained in:
1 parent
2057ccaeb5
commit
3aaf895514
1 file changed
+7
-2
@@ -1091,8 +1091,13 @@ public:
|
||||
--size_;
|
||||
}
|
||||
|
||||
template<typename Key>
|
||||
std::size_t erase(const Key& x)
|
||||
template<
|
||||
typename Key,
|
||||
typename std::enable_if<
|
||||
!std::is_convertible<Key&&,iterator>::value&&
|
||||
!std::is_convertible<Key&&,const_iterator>::value>::type* =nullptr
|
||||
>
|
||||
std::size_t erase(Key&& x)
|
||||
{
|
||||
auto it=find(x);
|
||||
if(it!=end()){
|
||||
|
||||
Reference in new issue
Block a user