/usr/include/boost/icl/detail
NameSizeModeActions
associated_value.hpp15570644editdlrm
boost_config.hpp10320644editdlrm
concept_check.hpp9580644editdlrm
design_config.hpp56080644editdlrm
element_comparer.hpp57360644editdlrm
element_iterator.hpp146290644editdlrm
exclusive_less_than.hpp10510644editdlrm
interval_map_algo.hpp57410644editdlrm
interval_morphism.hpp42340644editdlrm
interval_set_algo.hpp205880644editdlrm
interval_subset_comparer.hpp121010644editdlrm
mapped_reference.hpp71690644editdlrm
map_algo.hpp26590644editdlrm
notate.hpp16870644editdlrm
on_absorbtion.hpp13410644editdlrm
relation_state.hpp12720644editdlrm
set_algo.hpp44940644editdlrm
std_set.hpp12890644editdlrm
subset_comparer.hpp81050644editdlrm
Edit: /usr/include/boost/icl/detail/mapped_reference.hpp (7169B)
/*-----------------------------------------------------------------------------+ Copyright (c) 2009-2009: Joachim Faulhaber +------------------------------------------------------------------------------+ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENCE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +-----------------------------------------------------------------------------*/ #ifndef BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108 #define BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108 #include #include #include #include namespace boost{namespace icl { template class mapped_reference; //------------------------------------------------------------------------------ template struct is_mapped_reference_combinable{ typedef is_mapped_reference_combinable type; BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_mapped_reference_combinable > { typedef is_mapped_reference_combinable > type; BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mapped_reference_combinable > { typedef is_mapped_reference_combinable > type; BOOST_STATIC_CONSTANT(bool, value = true); }; //------------------------------------------------------------------------------ template struct is_mapped_reference_or_combinable{ typedef is_mapped_reference_or_combinable type; BOOST_STATIC_CONSTANT(bool, value = is_mapped_reference_combinable::value); }; template struct is_mapped_reference_or_combinable > { typedef is_mapped_reference_or_combinable > type; BOOST_STATIC_CONSTANT(bool, value = true); }; //------------------------------------------------------------------------------ template class mapped_reference { private: mapped_reference& operator = (const mapped_reference&); public: typedef FirstT first_type; typedef SecondT second_type; typedef mapped_reference type; typedef typename mpl::if_, second_type&, const second_type&>::type second_reference_type; typedef std::pair< first_type, second_type> std_pair_type; typedef std::pair key_std_pair_type; const first_type& first ; second_reference_type second; mapped_reference(const FirstT& fst, second_reference_type snd) : first(fst), second(snd){} template mapped_reference(const mapped_reference& source): first(source.first), second(source.second){} template operator std::pair(){ return std::pair(first, second); } template typename enable_if, bool>::type operator == (const Comparand& right)const { return first == right.first && second == right.second; } template typename enable_if, bool>::type operator != (const Comparand& right)const { return !(*this == right); } template typename enable_if, bool>::type operator < (const Comparand& right)const { return first < right.first ||(!(right.first < first) && second < right.second); } template typename enable_if, bool>::type operator > (const Comparand& right)const { return first > right.first ||(!(right.first > first) && second > right.second); } template typename enable_if, bool>::type operator <= (const Comparand& right)const { return !(*this > right); } template typename enable_if, bool>::type operator >= (const Comparand& right)const { return !(*this < right); } }; //------------------------------------------------------------------------------ template inline typename enable_if, bool>::type operator == ( const StdPairT& left, const mapped_reference& right) { return right == left; } template inline typename enable_if, bool>::type operator != ( const StdPairT& left, const mapped_reference& right) { return !(right == left); } //------------------------------------------------------------------------------ template inline typename enable_if, bool>::type operator < ( const StdPairT& left, const mapped_reference& right) { return right > left; } //------------------------------------------------------------------------------ template inline typename enable_if, bool>::type operator > ( const StdPairT& left, const mapped_reference& right) { return right < left; } //------------------------------------------------------------------------------ template inline typename enable_if, bool>::type operator <= ( const StdPairT& left, const mapped_reference& right) { return !(right < left); } //------------------------------------------------------------------------------ template inline typename enable_if, bool>::type operator >= ( const StdPairT& left, const mapped_reference& right) { return !(left < right); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ template inline mapped_reference make_mapped_reference(const FirstT& left, SecondT& right) { return mapped_reference(left, right); } }} // namespace icl boost #endif // BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108