array_fail_spa_wpa_a.cpp 387 B

123456789101112131415161718192021222324
  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. #include <boost/shared_ptr.hpp>
  9. #include <boost/weak_ptr.hpp>
  10. struct X
  11. {
  12. };
  13. struct Y: public X
  14. {
  15. };
  16. int main()
  17. {
  18. boost::shared_ptr<Y[]> px;
  19. boost::weak_ptr<X[]> px2; px2 = px;
  20. }