]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/smart_ptr/test/sp_constexpr_test2.cpp
2 // sp_constexpr_test2.cpp
4 // Copyright 2017 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/config.hpp>
12 #include <boost/detail/workaround.hpp>
14 #define HAVE_CONSTEXPR_INIT
16 #if defined( BOOST_NO_CXX11_CONSTEXPR )
17 # undef HAVE_CONSTEXPR_INIT
20 #if BOOST_WORKAROUND( BOOST_MSVC, < 1930 )
21 # undef HAVE_CONSTEXPR_INIT
24 #if defined(__clang__) && defined( BOOST_NO_CXX14_CONSTEXPR )
25 # undef HAVE_CONSTEXPR_INIT
28 #if !defined( HAVE_CONSTEXPR_INIT )
36 #include <boost/shared_ptr.hpp>
37 #include <boost/weak_ptr.hpp>
38 #include <boost/enable_shared_from_this.hpp>
39 #include <boost/core/lightweight_test.hpp>
41 struct X
: public boost::enable_shared_from_this
<X
>
45 constexpr X() BOOST_NOEXCEPT
: v_( 1 )
60 BOOST_TEST_EQ( x
.v_
, 1 );
65 return boost::report_errors();
68 #endif // #if defined( BOOST_NO_CXX11_CONSEXPR )