1 #include <boost/config.hpp>
3 // wp_convertible_test.cpp
5 // Copyright (c) 2008 Peter Dimov
7 // Distributed under the Boost Software License, Version 1.0.
8 // See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt
11 #include <boost/detail/lightweight_test.hpp>
12 #include <boost/weak_ptr.hpp>
30 int f( boost::weak_ptr<void const> )
35 int f( boost::weak_ptr<int> )
40 int f( boost::weak_ptr<incomplete> )
45 int g( boost::weak_ptr<X> )
50 int g( boost::weak_ptr<Y> )
55 int g( boost::weak_ptr<incomplete> )
62 BOOST_TEST( 1 == f( boost::weak_ptr<double>() ) );
63 BOOST_TEST( 1 == f( boost::shared_ptr<double>() ) );
64 BOOST_TEST( 4 == g( boost::weak_ptr<Z>() ) );
65 BOOST_TEST( 4 == g( boost::shared_ptr<Z>() ) );
67 return boost::report_errors();