Chris@16
|
1 /*-----------------------------------------------------------------------------+
|
Chris@16
|
2 Copyright (c) 2010-2010: Joachim Faulhaber
|
Chris@16
|
3 +------------------------------------------------------------------------------+
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
5 (See accompanying file LICENCE.txt or copy at
|
Chris@16
|
6 http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
7 +-----------------------------------------------------------------------------*/
|
Chris@16
|
8 #ifndef BOOST_ICL_DETAIL_ASSOCIATED_VALUE_HPP_JOFA_100829
|
Chris@16
|
9 #define BOOST_ICL_DETAIL_ASSOCIATED_VALUE_HPP_JOFA_100829
|
Chris@16
|
10
|
Chris@16
|
11 #include <boost/icl/detail/design_config.hpp>
|
Chris@16
|
12 #include <boost/icl/type_traits/is_combinable.hpp>
|
Chris@16
|
13 #include <boost/mpl/not.hpp>
|
Chris@16
|
14 #include <boost/mpl/and.hpp>
|
Chris@16
|
15
|
Chris@16
|
16 namespace boost{namespace icl
|
Chris@16
|
17 {
|
Chris@16
|
18
|
Chris@16
|
19 template<class Type, class CoType>
|
Chris@16
|
20 typename enable_if< mpl::and_< is_key_compare_equal<Type,CoType>
|
Chris@16
|
21 , mpl::and_<is_map<Type>, is_map<CoType> > >,
|
Chris@16
|
22 bool>::type
|
Chris@16
|
23 co_equal(typename Type::const_iterator left_, typename CoType::const_iterator right_,
|
Chris@16
|
24 const Type* = 0, const CoType* = 0)
|
Chris@16
|
25 {
|
Chris@16
|
26 return co_value<Type>(left_) == co_value<CoType>(right_);
|
Chris@16
|
27 }
|
Chris@16
|
28
|
Chris@16
|
29 template<class Type, class CoType>
|
Chris@16
|
30 typename enable_if< mpl::and_< is_key_compare_equal<Type,CoType>
|
Chris@16
|
31 , mpl::not_<mpl::and_<is_map<Type>, is_map<CoType> > > >,
|
Chris@16
|
32 bool>::type
|
Chris@16
|
33 co_equal(typename Type::const_iterator, typename CoType::const_iterator,
|
Chris@16
|
34 const Type* = 0, const CoType* = 0)
|
Chris@16
|
35 {
|
Chris@16
|
36 return true;
|
Chris@16
|
37 }
|
Chris@16
|
38
|
Chris@16
|
39
|
Chris@16
|
40 }} // namespace icl boost
|
Chris@16
|
41
|
Chris@16
|
42 #endif
|
Chris@16
|
43
|