]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/smart_ptr/test/weak_from_fail.cpp
1 // Copyright 2020 Peter Dimov
2 // Distributed under the Boost Software License, Version 1.0.
3 // https://www.boost.org/LICENSE_1_0.txt
5 #include <boost/shared_ptr.hpp>
6 #include <boost/smart_ptr/enable_shared_from.hpp>
8 struct X
: public boost::enable_shared_from
12 #if defined(__clang__) && defined(_MSC_VER)
13 // clang-cl claims that it accepts this code for compatibility
14 // with msvc, but no version of msvc accepts it
15 # pragma clang diagnostic error "-Wmicrosoft-using-decl"
20 boost::shared_ptr
<X
> px( new X
);