Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/multi_index/detail/value_compare.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@101 | 1 /* Copyright 2003-2013 Joaquin M Lopez Munoz. |
Chris@16 | 2 * Distributed under the Boost Software License, Version 1.0. |
Chris@16 | 3 * (See accompanying file LICENSE_1_0.txt or copy at |
Chris@16 | 4 * http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 5 * |
Chris@16 | 6 * See http://www.boost.org/libs/multi_index for library home page. |
Chris@16 | 7 */ |
Chris@16 | 8 |
Chris@16 | 9 #ifndef BOOST_MULTI_INDEX_DETAIL_VALUE_COMPARE_HPP |
Chris@16 | 10 #define BOOST_MULTI_INDEX_DETAIL_VALUE_COMPARE_HPP |
Chris@16 | 11 |
Chris@101 | 12 #if defined(_MSC_VER) |
Chris@16 | 13 #pragma once |
Chris@16 | 14 #endif |
Chris@16 | 15 |
Chris@16 | 16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ |
Chris@16 | 17 #include <boost/call_traits.hpp> |
Chris@16 | 18 #include <functional> |
Chris@16 | 19 |
Chris@16 | 20 namespace boost{ |
Chris@16 | 21 |
Chris@16 | 22 namespace multi_index{ |
Chris@16 | 23 |
Chris@16 | 24 namespace detail{ |
Chris@16 | 25 |
Chris@16 | 26 template<typename Value,typename KeyFromValue,typename Compare> |
Chris@16 | 27 struct value_comparison:std::binary_function<Value,Value,bool> |
Chris@16 | 28 { |
Chris@16 | 29 value_comparison( |
Chris@16 | 30 const KeyFromValue& key_=KeyFromValue(),const Compare& comp_=Compare()): |
Chris@16 | 31 key(key_),comp(comp_) |
Chris@16 | 32 { |
Chris@16 | 33 } |
Chris@16 | 34 |
Chris@16 | 35 bool operator()( |
Chris@16 | 36 typename call_traits<Value>::param_type x, |
Chris@16 | 37 typename call_traits<Value>::param_type y)const |
Chris@16 | 38 { |
Chris@16 | 39 return comp(key(x),key(y)); |
Chris@16 | 40 } |
Chris@16 | 41 |
Chris@16 | 42 private: |
Chris@16 | 43 KeyFromValue key; |
Chris@16 | 44 Compare comp; |
Chris@16 | 45 }; |
Chris@16 | 46 |
Chris@16 | 47 } /* namespace multi_index::detail */ |
Chris@16 | 48 |
Chris@16 | 49 } /* namespace multi_index */ |
Chris@16 | 50 |
Chris@16 | 51 } /* namespace boost */ |
Chris@16 | 52 |
Chris@16 | 53 #endif |