12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #ifndef BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP
- #define BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP
- #ifndef BOOST_CONFIG_HPP
- # include <boost/config.hpp>
- #endif
- #if defined(BOOST_HAS_PRAGMA_ONCE)
- # pragma once
- #endif
- #include <cstddef>
- namespace boost {
- namespace intrusive {
- template<class ValueType>
- struct value_less
- {
- bool operator()(const ValueType &a, const ValueType &b) const
- { return a < b; }
- };
- template<class T>
- struct value_less<T*>
- {
- bool operator()(const T *a, const T* b) const
- { return std::size_t(a) < std::size_t(b); }
- };
- template<class ValueType>
- struct value_equal
- {
- bool operator()(const ValueType &a, const ValueType &b) const
- { return a == b; }
- };
- }
- }
- #endif
|