1 | // Copyright 2020 Peter Dimov |
2 | // Distributed under the Boost Software License, Version 1.0. |
3 | // https://www.boost.org/LICENSE_1_0.txt |
4 | |
5 | #if defined(__cpp_deduction_guides) |
6 | |
7 | #include <boost/shared_ptr.hpp> |
8 | #include <boost/weak_ptr.hpp> |
9 | |
10 | int main() |
11 | { |
12 | boost::shared_ptr<int> p1( new int ); |
13 | boost::weak_ptr<int> p2( p1 ); |
14 | boost::shared_ptr p3( p2 ); |
15 | } |
16 | |
17 | #else |
18 | |
19 | #include <boost/config/pragma_message.hpp> |
20 | |
21 | BOOST_PRAGMA_MESSAGE( "Skipping test because __cpp_deduction_guides is not defined" ) |
22 | |
23 | int main() {} |
24 | |
25 | #endif |
26 | |