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 | #include <boost/smart_ptr.hpp> |
6 | #include <boost/config.hpp> |
7 | #include <boost/config/workaround.hpp> |
8 | |
9 | int main() |
10 | { |
11 | boost::shared_ptr<int> p1( new int ); |
12 | boost::shared_ptr<int[]> p2( new int[1] ); |
13 | |
14 | boost::make_shared<int>(); |
15 | |
16 | #if !BOOST_WORKAROUND(BOOST_MSVC, < 1500) |
17 | |
18 | boost::make_shared<int[]>( size: 1 ); |
19 | |
20 | #endif |
21 | } |
22 |