Sha256: 48bda4c4b31d0d7a272d17bb2cdb2dc4cdf3d17275cb6fa552f619e0fe9327fc

Contents?: true

Size: 1.91 KB

Versions: 115

Compression:

Stored size: 1.91 KB

Contents

/*
 *
 * Copyright (c) 2002
 * John Maddock
 *
 * Use, modification and distribution are subject to the 
 * Boost Software License, Version 1.0. (See accompanying file 
 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 *
 */

 /*
  *   LOCATION:    see http://www.boost.org for most recent version.
  *   FILE         regex_match.hpp
  *   VERSION      see <boost/version.hpp>
  *   DESCRIPTION: Iterator traits for selecting an iterator type as
  *                an integral constant expression.
  */


#ifndef BOOST_REGEX_ITERATOR_CATEGORY_HPP
#define BOOST_REGEX_ITERATOR_CATEGORY_HPP

#include <iterator>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_pointer.hpp>

namespace boost{
namespace detail{

template <class I>
struct is_random_imp
{
#ifndef BOOST_NO_STD_ITERATOR_TRAITS
private:
   typedef typename std::iterator_traits<I>::iterator_category cat;
public:
   BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
#else
   BOOST_STATIC_CONSTANT(bool, value = false);
#endif
};

template <class I>
struct is_random_pointer_imp
{
   BOOST_STATIC_CONSTANT(bool, value = true);
};

template <bool is_pointer_type>
struct is_random_imp_selector
{
   template <class I>
   struct rebind
   {
      typedef is_random_imp<I> type;
   };
};

template <>
struct is_random_imp_selector<true>
{
   template <class I>
   struct rebind
   {
      typedef is_random_pointer_imp<I> type;
   };
};

}

template <class I>
struct is_random_access_iterator
{
private:
   typedef detail::is_random_imp_selector< ::boost::is_pointer<I>::value> selector;
   typedef typename selector::template rebind<I> bound_type;
   typedef typename bound_type::type answer;
public:
   BOOST_STATIC_CONSTANT(bool, value = answer::value);
};

#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
template <class I>
const bool is_random_access_iterator<I>::value;
#endif

}

#endif

Version data entries

115 entries across 115 versions & 3 rubygems

Version Path
passenger-6.0.24 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.7 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.6 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.5 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.4 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp
passenger-6.0.3 src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_category.hpp