X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2Fboost_intrusive%2Fdetail%2Fpointer_type.hpp;fp=senf%2Fboost_intrusive%2Fdetail%2Fpointer_type.hpp;h=065250f0f088d44c798dd25dec05dfb8c662e8eb;hb=8f1ff66f5b7d10cfc6d35fb72267bc2fb3b588f7;hp=0000000000000000000000000000000000000000;hpb=fbd3d0ff298683f08b59f25288d8c243e03b206c;p=senf.git diff --git a/senf/boost_intrusive/detail/pointer_type.hpp b/senf/boost_intrusive/detail/pointer_type.hpp new file mode 100644 index 0000000..065250f --- /dev/null +++ b/senf/boost_intrusive/detail/pointer_type.hpp @@ -0,0 +1,54 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion GaztaƱaga 2006. 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/intrusive for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTRUSIVE_POINTER_TYPE_HPP +#define BOOST_INTRUSIVE_POINTER_TYPE_HPP + +#include "config_begin.hpp" + +namespace boost { +namespace intrusive { +namespace detail { + +struct two {char _[2];}; + +namespace pointer_type_imp +{ + +template static two test(...); +template static char test(typename U::pointer* = 0); + +} //namespace pointer_type_imp + +template +struct has_pointer_type +{ + static const bool value = sizeof(pointer_type_imp::test(0)) == 1; +}; + +template ::value> +struct pointer_type +{ + typedef typename A::pointer type; +}; + +template +struct pointer_type +{ + typedef T* type; +}; + +} //namespace detail +} //namespace intrusive +} // namespace boost + +#include "config_end.hpp" + +#endif //#ifndef BOOST_INTRUSIVE_POINTER_TYPE_HPP