aboutsummaryrefslogtreecommitdiff
path: root/butl
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-13 09:08:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-10-13 09:08:19 +0200
commit95e5d0ca8e4769b87f4c547696b42f42c399e127 (patch)
tree01a1f0d01bd7e412c6ecf14bd631402db793a751 /butl
parent25a9484378ddaae9602ec54532cdc03b1f1924ef (diff)
Minor changes to utilities
Diffstat (limited to 'butl')
-rw-r--r--butl/utility15
1 files changed, 11 insertions, 4 deletions
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 <string>
-#include <cstddef> // size_t
-#include <utility> // forward()
-#include <cstring> // strcmp(), strlen()
+#include <cstddef> // size_t
+#include <utility> // forward()
+#include <cstring> // strcmp(), strlen()
+//#include <functional> // 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 <typename P>
+ // std::size_t operator() (const P& x) const {return std::hash (*x);}
+ //};
+
// Combine one or more hash values.
//
inline std::size_t