1 // Copyright 2018 Peter Dimov
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 //
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 
8 #include <boost/shared_ptr.hpp>
9 #include <boost/make_shared.hpp>
10 #include <boost/config.hpp>
11 #include <memory>
12 
13 #if defined(DLL_TEST_DYN_LINK)
14 # define EXPORT BOOST_SYMBOL_EXPORT
15 #else
16 # define EXPORT
17 #endif
18 
dll_test_41()19 EXPORT boost::shared_ptr<int> dll_test_41()
20 {
21     return boost::shared_ptr<int>( new int( 41 ) );
22 }
23 
dll_test_42()24 EXPORT boost::shared_ptr<int> dll_test_42()
25 {
26     return boost::make_shared<int>( 42 );
27 }
28 
dll_test_43()29 EXPORT boost::shared_ptr<int> dll_test_43()
30 {
31     return boost::allocate_shared<int>( std::allocator<int>(), 43 );
32 }
33 
dll_test_44()34 EXPORT boost::shared_ptr<int[]> dll_test_44()
35 {
36     return boost::make_shared<int[1]>( 44 );
37 }
38 
dll_test_45()39 EXPORT boost::shared_ptr<int[]> dll_test_45()
40 {
41     return boost::allocate_shared<int[1]>( std::allocator<int>(), 45 );
42 }
43