1 #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
2 #define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED
4 // MS compatible compilers support #pragma once
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
10 // detail/sp_typeinfo.hpp
12 // Copyright 2007 Peter Dimov
14 // Distributed under the Boost Software License, Version 1.0.
15 // See accompanying file LICENSE_1_0.txt or copy at
16 // http://www.boost.org/LICENSE_1_0.txt)
18 #include <boost/config.hpp>
20 #if defined( BOOST_NO_TYPEID )
28 typedef void* sp_typeinfo;
30 template<class T> struct sp_typeid_
35 template<class T> char sp_typeid_< T >::v_;
37 template<class T> struct sp_typeid_< T const >: sp_typeid_< T >
41 template<class T> struct sp_typeid_< T volatile >: sp_typeid_< T >
45 template<class T> struct sp_typeid_< T const volatile >: sp_typeid_< T >
53 #define BOOST_SP_TYPEID(T) (&boost::detail::sp_typeid_<T>::v_)
65 #if defined( BOOST_NO_STD_TYPEINFO )
67 typedef ::type_info sp_typeinfo;
71 typedef std::type_info sp_typeinfo;
79 #define BOOST_SP_TYPEID(T) typeid(T)
83 #endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED