forked from boostorg/unordered
restricted erase generic arg as per C++23 requirements
(hopefully fixes test errors in VS2015)
This commit is contained in:
@ -1091,8 +1091,13 @@ public:
|
|||||||
--size_;
|
--size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Key>
|
template<
|
||||||
std::size_t erase(const Key& x)
|
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);
|
auto it=find(x);
|
||||||
if(it!=end()){
|
if(it!=end()){
|
||||||
|
Reference in New Issue
Block a user