2 // Boost.Pointer Container
4 // Copyright Thorsten Ottosen 2003-2005. Use, modification and
5 // distribution is subject to the Boost Software License, Version
6 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // For more information, see http://www.boost.org/libs/ptr_container/
13 #ifndef BOOST_INDIRECT_CONTAINER_NULLABLE_HPP
14 #define BOOST_INDIRECT_CONTAINER_NULLABLE_HPP
16 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
20 #include <boost/type_traits/detail/yes_no_type.hpp>
21 #include <boost/mpl/eval_if.hpp>
22 #include <boost/mpl/identity.hpp>
23 #include <boost/config.hpp>
34 namespace ptr_container_detail
37 type_traits::yes_type is_nullable( const nullable<T>* );
39 type_traits::no_type is_nullable( ... );
46 BOOST_STATIC_CONSTANT( T*, var );
48 BOOST_STATIC_CONSTANT(bool, value = sizeof( ptr_container_detail::is_nullable( var ) )
49 == sizeof( type_traits::yes_type ) );
53 struct remove_nullable
55 typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< is_nullable<T>,
57 mpl::identity<T> >::type