]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/test/copy_ctor_mutates_rhs.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / python / test / copy_ctor_mutates_rhs.cpp
1 // Copyright David Abrahams 2003.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #include <boost/python/detail/copy_ctor_mutates_rhs.hpp>
6 #include <boost/static_assert.hpp>
7 #include <memory>
8 #include <string>
9
10 struct foo
11 {
12 operator std::auto_ptr<int>&() const;
13 };
14
15 int main()
16 {
17 using namespace boost::python::detail;
18 BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<int>::value);
19 BOOST_STATIC_ASSERT(copy_ctor_mutates_rhs<std::auto_ptr<int> >::value);
20 BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<std::string>::value);
21 BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<foo>::value);
22 return 0;
23 }