remove std::unary_function using

This commit is contained in:
2019-05-25 03:55:36 +07:00
parent 534c915dbd
commit 92b0c5b837
3 changed files with 3 additions and 9 deletions

View File

@@ -451,9 +451,7 @@ namespace e2d
namespace std
{
template < typename T >
struct hash<e2d::intrusive_ptr<T>> final
: std::unary_function<e2d::intrusive_ptr<T>, std::size_t>
{
struct hash<e2d::intrusive_ptr<T>> final {
std::size_t operator()(const e2d::intrusive_ptr<T>& p) const noexcept {
return std::hash<T*>()(p.get());
}

View File

@@ -182,9 +182,7 @@ namespace e2d
namespace std
{
template < typename Char >
struct hash<e2d::basic_string_hash<Char>>
: std::unary_function<e2d::basic_string_hash<Char>, std::size_t>
{
struct hash<e2d::basic_string_hash<Char>> {
std::size_t operator()(e2d::basic_string_hash<Char> hs) const noexcept {
return e2d::math::numeric_cast<std::size_t>(hs.hash());
}

View File

@@ -81,9 +81,7 @@ namespace e2d
namespace std
{
template <>
struct hash<e2d::url>
: std::unary_function<e2d::url, std::size_t>
{
struct hash<e2d::url> {
std::size_t operator()(const e2d::url& u) const noexcept {
return e2d::math::numeric_cast<std::size_t>(
e2d::utils::sdbm_hash(