Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-31 08:04:59

0001 //////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2005-2012.
0004 // (C) Copyright Gennaro Prota 2003 - 2004.
0005 //
0006 // Distributed under the Boost Software License, Version 1.0.
0007 // (See accompanying file LICENSE_1_0.txt or copy at
0008 // http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 // See http://www.boost.org/libs/interprocess for documentation.
0011 //
0012 //////////////////////////////////////////////////////////////////////////////
0013 
0014 #ifndef BOOST_INTERPROCESS_DETAIL_POINTER_TYPE_HPP
0015 #define BOOST_INTERPROCESS_DETAIL_POINTER_TYPE_HPP
0016 
0017 #ifndef BOOST_CONFIG_HPP
0018 #  include <boost/config.hpp>
0019 #endif
0020 0021 ">#
0022 #if defined(BOOST_HAS_PRAGMA_ONCE)
0023 #  pragma once
0024 #endif
0025 
0026 #include <boost/interprocess/detail/config_begin.hpp>
0027 #include <boost/interprocess/detail/workaround.hpp>
0028 #include <boost/interprocess/detail/type_traits.hpp>
0029 
0030 namespace boost {
0031 namespace interprocess {
0032 namespace ipcdetail {
0033 
0034 struct two {char _[2];};
0035 
0036 namespace pointer_type_imp {
0037 
0038 template <class U> static two  test(...);
0039 template <class U> static char test(typename U::pointer* = 0);
0040 
0041 }  //namespace pointer_type_imp {
0042 
0043 template <class T>
0044 struct has_pointer_type
0045 {
0046     static const bool value = sizeof(pointer_type_imp::test<T>(0)) == 1;
0047 };
0048 
0049 namespace pointer_type_imp {
0050 
0051 template <class T, class D, bool = has_pointer_type<D>::value>
0052 struct pointer_type
0053 {
0054     typedef typename D::pointer type;
0055 };
0056 
0057 template <class T, class D>
0058 struct pointer_type<T, D, false>
0059 {
0060     typedef T* type;
0061 };
0062 
0063 }  //namespace pointer_type_imp {
0064 
0065 template <class T, class D>
0066 struct pointer_type
0067 {
0068     typedef typename pointer_type_imp::pointer_type<T,
0069         typename remove_reference<D>::type>::type type;
0070 };
0071 
0072 }  //namespace ipcdetail {
0073 }  //namespace interprocess {
0074 }  //namespace boost {
0075 
0076 #include <boost/interprocess/detail/config_end.hpp>
0077 
0078 #endif   //#ifndef BOOST_INTERPROCESS_DETAIL_POINTER_TYPE_HPP
0079