Sha256: 682993399bb3b837b3ba0b1384ddc70fd199236a30f50b379dd23fe92f49d2e3

Contents?: true

Size: 1.5 KB

Versions: 36

Compression:

Stored size: 1.5 KB

Contents

/* boost random/detail/ptr_helper.hpp header file
 *
 * Copyright Jens Maurer 2002
 * Distributed under 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)
 *
 * See http://www.boost.org for most recent version including documentation.
 *
 * $Id$
 *
 */

#ifndef BOOST_RANDOM_DETAIL_PTR_HELPER_HPP
#define BOOST_RANDOM_DETAIL_PTR_HELPER_HPP

#include <boost/config.hpp>


namespace boost {
namespace random {
namespace detail {

// type_traits could help here, but I don't want to depend on type_traits.
template<class T>
struct ptr_helper
{
  typedef T value_type;
  typedef T& reference_type;
  typedef const T& rvalue_type;
  static reference_type ref(T& r) { return r; }
  static const T& ref(const T& r) { return r; }
};

template<class T>
struct ptr_helper<T&>
{
  typedef T value_type;
  typedef T& reference_type;
  typedef T& rvalue_type;
  static reference_type ref(T& r) { return r; }
  static const T& ref(const T& r) { return r; }
};

template<class T>
struct ptr_helper<T*>
{
  typedef T value_type;
  typedef T& reference_type;
  typedef T* rvalue_type;
  static reference_type ref(T * p) { return *p; }
  static const T& ref(const T * p) { return *p; }
};

} // namespace detail
} // namespace random
} // namespace boost

//
// BOOST_RANDOM_PTR_HELPER_SPEC --
//
//  Helper macro for broken compilers defines specializations of
//  ptr_helper.
//
# define BOOST_RANDOM_PTR_HELPER_SPEC(T)

#endif // BOOST_RANDOM_DETAIL_PTR_HELPER_HPP

Version data entries

36 entries across 36 versions & 2 rubygems

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