utils: add operator== (const std::unique_ptr<T>&, T*)
This commit is contained in:
parent
03f1520b43
commit
511df5b660
|
@ -1,6 +1,8 @@
|
|||
#ifndef utils_hh_INCLUDED
|
||||
#define utils_hh_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Kakoune
|
||||
{
|
||||
|
||||
|
@ -29,6 +31,11 @@ ReversedContainer<Container> reversed(Container& container)
|
|||
return ReversedContainer<Container>(container);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator== (const std::unique_ptr<T>& lhs, T* rhs)
|
||||
{
|
||||
return lhs.get() == rhs;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user