From 95e5d0ca8e4769b87f4c547696b42f42c399e127 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Oct 2016 09:08:19 +0200 Subject: Minor changes to utilities --- butl/utility | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'butl/utility') diff --git a/butl/utility b/butl/utility index cedfc3d..a513325 100644 --- a/butl/utility +++ b/butl/utility @@ -6,9 +6,10 @@ #define BUTL_UTILITY #include -#include // size_t -#include // forward() -#include // strcmp(), strlen() +#include // size_t +#include // forward() +#include // strcmp(), strlen() +//#include // hash namespace butl { @@ -91,7 +92,7 @@ namespace butl // struct compare_c_string { - bool operator() (const char* x, const char* y) const + bool operator() (const char* x, const char* y) const noexcept { return std::strcmp (x, y) < 0; } @@ -103,6 +104,12 @@ namespace butl bool operator() (const P& x, const P& y) const {return *x < *y;} }; + //struct hash_pointer_target + //{ + // template + // std::size_t operator() (const P& x) const {return std::hash (*x);} + //}; + // Combine one or more hash values. // inline std::size_t -- cgit v1.1