Chris@16: // Boost.Range library Chris@16: // Chris@16: // Copyright Thorsten Ottosen 2003-2004. Use, modification and Chris@16: // distribution is subject to the Boost Software License, Version Chris@16: // 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // For more information, see http://www.boost.org/libs/range/ Chris@16: // Chris@16: Chris@16: #ifndef BOOST_RANGE_ITERATOR_HPP Chris@16: #define BOOST_RANGE_ITERATOR_HPP Chris@16: Chris@101: #if defined(_MSC_VER) Chris@16: # pragma once Chris@16: #endif Chris@16: Chris@16: #include Chris@101: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: namespace boost Chris@16: { Chris@16: Chris@101: #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) Chris@16: Chris@101: namespace range_detail_vc7_1 Chris@101: { Chris@101: template< typename C, typename Sig = void(C) > Chris@101: struct range_iterator Chris@101: { Chris@101: typedef BOOST_RANGE_DEDUCED_TYPENAME Chris@101: mpl::eval_if_c< is_const::value, Chris@101: range_const_iterator< typename remove_const::type >, Chris@101: range_mutable_iterator >::type type; Chris@101: }; Chris@101: Chris@101: template< typename C, typename T > Chris@101: struct range_iterator< C, void(T[]) > Chris@101: { Chris@101: typedef T* type; Chris@101: }; Chris@101: } Chris@101: Chris@101: #endif Chris@16: Chris@101: template< typename C, typename Enabler=void > Chris@16: struct range_iterator Chris@16: { Chris@16: #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) Chris@101: Chris@101: typedef BOOST_RANGE_DEDUCED_TYPENAME Chris@101: range_detail_vc7_1::range_iterator::type type; Chris@101: Chris@101: #else Chris@16: Chris@101: private: Chris@101: typedef typename remove_reference::type param_t; Chris@16: Chris@101: public: Chris@101: typedef typename mpl::eval_if_c< Chris@101: is_const::value, Chris@101: range_const_iterator::type>, Chris@101: range_mutable_iterator Chris@101: >::type type; Chris@101: Chris@101: #endif Chris@101: }; Chris@101: Chris@101: } // namespace boost Chris@16: Chris@16: #endif