]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/smart_ptr/test/pointer_cast_st_fail.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / smart_ptr / test / pointer_cast_st_fail.cpp
CommitLineData
7c673cae
FG
1//
2// A negative test for unique_ptr static_cast
3//
4// Copyright 2016 Peter Dimov
5//
6// Distributed under the Boost Software License, Version 1.0.
7// See accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt
9//
10
11#include <boost/pointer_cast.hpp>
12#include <memory>
13
14int main()
15{
16 std::unique_ptr<int> p1( new int );
17 std::unique_ptr<int[]> p2 = boost::static_pointer_cast<int[]>( std::move( p1 ) );
18}