os/ossrv/ossrv_pub/boost_apis/boost/python/detail/pointee.hpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright David Abrahams 2002.
sl@0
     2
// Distributed under the Boost Software License, Version 1.0. (See
sl@0
     3
// accompanying file LICENSE_1_0.txt or copy at
sl@0
     4
// http://www.boost.org/LICENSE_1_0.txt)
sl@0
     5
#ifndef POINTEE_DWA2002323_HPP
sl@0
     6
# define POINTEE_DWA2002323_HPP
sl@0
     7
sl@0
     8
# include <boost/type_traits/object_traits.hpp>
sl@0
     9
sl@0
    10
namespace boost { namespace python { namespace detail { 
sl@0
    11
sl@0
    12
template <bool is_ptr = true>
sl@0
    13
struct pointee_impl
sl@0
    14
{
sl@0
    15
    template <class T> struct apply : remove_pointer<T> {};
sl@0
    16
};
sl@0
    17
sl@0
    18
template <>
sl@0
    19
struct pointee_impl<false>
sl@0
    20
{
sl@0
    21
    template <class T> struct apply
sl@0
    22
    {
sl@0
    23
        typedef typename T::element_type type;
sl@0
    24
    };
sl@0
    25
};
sl@0
    26
sl@0
    27
template <class T>
sl@0
    28
struct pointee
sl@0
    29
    : pointee_impl<is_pointer<T>::value>::template apply<T>
sl@0
    30
{
sl@0
    31
};
sl@0
    32
sl@0
    33
}}} // namespace boost::python::detail
sl@0
    34
sl@0
    35
#endif // POINTEE_DWA2002323_HPP