/usr/include/boost/move/detail
Edit: /usr/include/boost/move/detail/pointer_element.hpp (4948B)
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2014-2017. 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/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP
#define BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP
#ifndef BOOST_CONFIG_HPP
# include
#endif
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
#include
#endif //BOOST_MOVE_DETAIL_WORKAROUND_HPP
namespace boost {
namespace movelib {
namespace detail{
//////////////////////
//struct first_param
//////////////////////
template struct first_param
{ typedef void type; };
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template class TemplateClass, typename T, typename... Args>
struct first_param< TemplateClass >
{
typedef T type;
};
#else //C++03 compilers
template < template //0arg
class TemplateClass, class T
>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //1arg
class TemplateClass, class T
, class P0>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //2arg
class TemplateClass, class T
, class P0, class P1>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //3arg
class TemplateClass, class T
, class P0, class P1, class P2>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //4arg
class TemplateClass, class T
, class P0, class P1, class P2, class P3>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //5arg
class TemplateClass, class T
, class P0, class P1, class P2, class P3, class P4>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //6arg
class TemplateClass, class T
, class P0, class P1, class P2, class P3, class P4, class P5>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //7arg
class TemplateClass, class T
, class P0, class P1, class P2, class P3, class P4, class P5, class P6>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //8arg
class TemplateClass, class T
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7>
struct first_param
< TemplateClass >
{ typedef T type; };
template < template //9arg
class TemplateClass, class T
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8>
struct first_param
< TemplateClass >
{ typedef T type; };
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template
struct has_internal_pointer_element
{
template
static char test(int, typename X::element_type*);
template
static int test(...);
static const bool value = (1 == sizeof(test(0, 0)));
};
template::value>
struct pointer_element_impl
{
typedef typename Ptr::element_type type;
};
template
struct pointer_element_impl
{
typedef typename boost::movelib::detail::first_param::type type;
};
} //namespace detail{
template
struct pointer_element
{
typedef typename ::boost::movelib::detail::pointer_element_impl::type type;
};
template
struct pointer_element
{ typedef T type; };
} //namespace movelib {
} //namespace boost {
#endif // defined(BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP)