2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

This commit was manufactured by cvs2svn to create branch 'mpl_v2'.

[SVN r15247]
This commit is contained in:
nobody
2002-09-09 21:58:16 +00:00
parent 40e6b73721
commit 17f0899211
178 changed files with 17861 additions and 0 deletions

34
test/object_manager.cpp Executable file
View File

@@ -0,0 +1,34 @@
// 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>
#include <boost/python/handle.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;
}