]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/smart_ptr/test/sp_array_cv_test.cpp
2 // sp_array_cv_test.cpp
4 // Copyright (c) 2012 Peter Dimov
6 // Distributed under the Boost Software License, Version 1.0.
7 // See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt
11 #include <boost/shared_ptr.hpp>
25 #define TEST_CONV( T, U ) \
27 boost::shared_ptr< T > p1; \
28 boost::shared_ptr< U > p2( p1 ); \
30 boost::shared_ptr< U > p3 = boost::shared_ptr< T >(); \
31 p3 = boost::shared_ptr< T >(); \
34 #define TEST_CV_TRUE( T, U ) \
36 TEST_CONV( T, const U ) \
37 TEST_CONV( T, volatile U ) \
38 TEST_CONV( T, const volatile U ) \
39 TEST_CONV( const T, const U ) \
40 TEST_CONV( const T, const volatile U ) \
41 TEST_CONV( volatile T, volatile U ) \
42 TEST_CONV( volatile T, const volatile U ) \
43 TEST_CONV( const volatile T, const volatile U )
48 TEST_CV_TRUE( X
, void )
51 TEST_CV_TRUE( X
[], X
[] )
52 TEST_CV_TRUE( X
[3], X
[3] )
54 TEST_CV_TRUE( X
[3], X
[] )
56 TEST_CV_TRUE( X
[], void )
57 TEST_CV_TRUE( X
[3], void )