2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00
Files
python/test/copy_ctor_mutates_rhs.cpp
Dave Abrahams 479d8fc0f6 shared_ptr deleter introspection support
miscellaneous cleanups and MPL idiom-izing


[SVN r17622]
2003-02-25 01:03:40 +00:00

25 lines
833 B
C++
Executable File

// Copyright David Abrahams 2003. Permission to copy, use,
// modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided
// "as is" without express or implied warranty, and with no claim as
// to its suitability for any purpose.
#include <boost/python/detail/copy_ctor_mutates_rhs.hpp>
#include <boost/static_assert.hpp>
#include <memory>
#include <string>
struct foo
{
operator std::auto_ptr<int>&() const;
};
int main()
{
using namespace boost::python::detail;
BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<int>::value);
BOOST_STATIC_ASSERT(copy_ctor_mutates_rhs<std::auto_ptr<int> >::value);
BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<std::string>::value);
BOOST_STATIC_ASSERT(!copy_ctor_mutates_rhs<foo>::value);
return 0;
}