diff options
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/history.cc | 6 | ||||
-rw-r--r-- | src/item.cc | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4e0e23de..0d6bc085 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -183,7 +183,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") if (BUILD_LIBRARY) list(APPEND _args ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}) endif() - list(APPEND _args "-std=c++11 ") + list(APPEND _args "-std=c++11") if (CYGWIN) list(APPEND _args "-U__STRICT_ANSI__") endif() diff --git a/src/history.cc b/src/history.cc index dbcdc823..d5eb727c 100644 --- a/src/history.cc +++ b/src/history.cc @@ -39,7 +39,11 @@ #include "history.h" template <typename T> -struct f_max : public std::binary_function<T, T, bool> { +struct f_max +#if __cplusplus < 201103L +: public std::binary_function<T, T, bool> +#endif +{ T operator()(const T& x, const T& y) const { return std::max(x, y); } diff --git a/src/item.cc b/src/item.cc index 30727c1b..df0ce920 100644 --- a/src/item.cc +++ b/src/item.cc @@ -105,7 +105,9 @@ optional<value_t> item_t::get_tag(const mask_t& tag_mask, namespace { struct CaseInsensitiveKeyCompare +#if __cplusplus < 201103L : public std::binary_function<string, string, bool> +#endif { bool operator()(const string& s1, const string& s2) const { return boost::algorithm::ilexicographical_compare(s1, s2); |