Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:37

0001 // Boost.Bimap
0002 //
0003 // Copyright (c) 2006-2007 Matias Capeletto
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 /// \file container_adaptor/support/iterator_facade_converters.hpp
0010 /// \brief Converter for Boost.Iterators based iterators.
0011 
0012 #ifndef BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_ITERATOR_FACADE_CONVERTERS_HPP
0013 #define BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_ITERATOR_FACADE_CONVERTERS_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 namespace boost {
0022 namespace bimaps {
0023 namespace container_adaptor {
0024 
0025 /// \brief Utilities to help in the construction of a container adaptor
0026 
0027 namespace support {
0028 
0029 /// \brief Converter for Boost.Iterators based iterators.
0030 /**
0031 Container adaptor is designed to play well with Boost.Iterators. This
0032 converter can be used if this library is used to adapt the iterators.
0033                                                                             **/
0034 template
0035 <
0036     class Iterator,
0037     class ConstIterator
0038 >
0039 struct iterator_facade_to_base
0040 {
0041     BOOST_DEDUCED_TYPENAME Iterator::base_type operator()(Iterator iter) const
0042     {
0043         return iter.base();
0044     }
0045 
0046     BOOST_DEDUCED_TYPENAME ConstIterator::base_type operator()(ConstIterator iter) const
0047     {
0048         return iter.base();
0049     }
0050 };
0051 
0052 #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
0053 
0054 template
0055 <
0056     class Iterator
0057 >
0058 struct iterator_facade_to_base<Iterator,Iterator>
0059 {
0060     BOOST_DEDUCED_TYPENAME Iterator::base_type operator()(Iterator iter) const
0061     {
0062         return iter.base();
0063     }
0064 };
0065 
0066 #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
0067 
0068 #undef BOOST_BIMAP_CONTAINER_ADAPTOR_IMPLEMENT_CONVERT_FACADE_FUNCTION
0069 
0070 
0071 } // namespace support
0072 } // namespace container_adaptor
0073 } // namespace bimaps
0074 } // namespace boost
0075 
0076 
0077 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_ITERATOR_FACADE_CONVERTERS_HPP