mirror of
				https://github.com/boostorg/smart_ptr.git
				synced 2025-11-04 01:31:51 +01:00 
			
		
		
		
	Test make_shared/allocate_shared in dll_test too
This commit is contained in:
		@@ -6,7 +6,9 @@
 | 
			
		||||
// http://www.boost.org/LICENSE_1_0.txt
 | 
			
		||||
 | 
			
		||||
#include <boost/shared_ptr.hpp>
 | 
			
		||||
#include <boost/make_shared.hpp>
 | 
			
		||||
#include <boost/config.hpp>
 | 
			
		||||
#include <memory>
 | 
			
		||||
 | 
			
		||||
#if defined(DLL_TEST_DYN_LINK)
 | 
			
		||||
# define EXPORT BOOST_SYMBOL_EXPORT
 | 
			
		||||
@@ -14,7 +16,27 @@
 | 
			
		||||
# define EXPORT
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
EXPORT boost::shared_ptr<int> dll_test()
 | 
			
		||||
EXPORT boost::shared_ptr<int> dll_test_41()
 | 
			
		||||
{
 | 
			
		||||
    return boost::shared_ptr<int>( new int( 42 ) );
 | 
			
		||||
    return boost::shared_ptr<int>( new int( 41 ) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
EXPORT boost::shared_ptr<int> dll_test_42()
 | 
			
		||||
{
 | 
			
		||||
    return boost::make_shared<int>( 42 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
EXPORT boost::shared_ptr<int> dll_test_43()
 | 
			
		||||
{
 | 
			
		||||
    return boost::allocate_shared<int>( std::allocator<int>(), 43 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
EXPORT boost::shared_ptr<int[]> dll_test_44()
 | 
			
		||||
{
 | 
			
		||||
    return boost::make_shared<int[1]>( 44 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
EXPORT boost::shared_ptr<int[]> dll_test_45()
 | 
			
		||||
{
 | 
			
		||||
    return boost::allocate_shared<int[1]>( std::allocator<int>(), 45 );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user