1 //
2 // Copyright (c) 2012 Peter Dimov
3 //
4 // Distributed under the Boost Software License, Version 1.0.
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 
9 #include <boost/shared_ptr.hpp>
10 #include <boost/weak_ptr.hpp>
11 
12 struct X
13 {
14 };
15 
16 struct Y: public X
17 {
18 };
19 
main()20 int main()
21 {
22     boost::shared_ptr<Y[]> px;
23     boost::weak_ptr<X[]> px2( px );
24 }
25