2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 04:42:28 +00:00
Files
python/test/object_manager.cpp
Dave Abrahams 5b803f00e1 VC6 workarounds
[SVN r14447]
2002-07-14 12:38:41 +00:00

34 lines
1.3 KiB
C++
Executable File

// Copyright David Abrahams 2002. 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/converter/object_manager.hpp>
#include <boost/python/borrowed.hpp>
#include <boost/static_assert.hpp>
using namespace boost::python;
using namespace boost::python::converter;
struct X {};
int main()
{
BOOST_STATIC_ASSERT(is_object_manager<handle<> >::value);
BOOST_STATIC_ASSERT(!is_object_manager<int>::value);
BOOST_STATIC_ASSERT(!is_object_manager<X>::value);
BOOST_STATIC_ASSERT(is_reference_to_object_manager<handle<>&>::value);
BOOST_STATIC_ASSERT(is_reference_to_object_manager<handle<> const&>::value);
BOOST_STATIC_ASSERT(is_reference_to_object_manager<handle<> volatile&>::value);
BOOST_STATIC_ASSERT(is_reference_to_object_manager<handle<> const volatile&>::value);
BOOST_STATIC_ASSERT(!is_reference_to_object_manager<handle<> >::value);
BOOST_STATIC_ASSERT(!is_reference_to_object_manager<X>::value);
BOOST_STATIC_ASSERT(!is_reference_to_object_manager<X&>::value);
BOOST_STATIC_ASSERT(!is_reference_to_object_manager<X const&>::value);
return 0;
}