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(__GNUC__) && __GNUC__ >= 5 && __cplusplus >= 201103L
6# pragma GCC diagnostic error "-Wsuggest-override"
7#endif
8
9#include <boost/smart_ptr.hpp>
10#include <boost/config.hpp>
11#include <boost/config/workaround.hpp>
12
13int main()
14{
15 boost::shared_ptr<int> p1( new int );
16 boost::shared_ptr<int[]> p2( new int[1] );
17
18 boost::make_shared<int>();
19
20#if !BOOST_WORKAROUND(BOOST_MSVC, < 1500)
21
22 boost::make_shared<int[]>( size: 1 );
23
24#endif
25}
26

source code of boost/libs/smart_ptr/test/sp_override_test.cpp