Files
boost_smart_ptr/test/sp_pedantic_test.cpp

22 lines
457 B
C++
Raw Permalink Normal View History

2020-04-26 19:57:05 +03:00
// Copyright 2020 Peter Dimov
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/smart_ptr.hpp>
2020-05-31 20:14:25 +03:00
#include <boost/config.hpp>
#include <boost/config/workaround.hpp>
2020-04-26 19:57:05 +03:00
int main()
{
boost::shared_ptr<int> p1( new int );
boost::shared_ptr<int[]> p2( new int[1] );
boost::make_shared<int>();
2020-05-31 20:14:25 +03:00
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1500)
2020-04-26 19:57:05 +03:00
boost::make_shared<int[]>( 1 );
2020-05-31 20:14:25 +03:00
#endif
2020-04-26 19:57:05 +03:00
}