Edit: /usr/include/luabind/std_shared_ptr_converter.hpp (2271B)
// Copyright Christian Neumüller 2012. Use, modification and distribution is
// subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef LUABIND_STD_SHAREDPTR_CONVERTER_HPP_INCLUDED
#define LUABIND_STD_SHAREDPTR_CONVERTER_HPP_INCLUDED LUABIND_STD_SHAREDPTR_CONVERTER_HPP_INCLUDED
#include
#if defined(LUABIND_NO_STD_SHARED_PTR) \
|| defined(BOOST_NO_CXX11_SMART_PTR) \
&& !defined(BOOST_HAS_TR1_SHARED_PTR) \
&& (!defined(BOOST_MSVC) || BOOST_MSVC < 1600)
# ifndef LUABIND_NO_STD_SHARED_PTR
# define LUABIND_NO_STD_SHARED_PTR
# endif
#else
# include
# include // shared_ptr
# if BOOST_VERSION >= 105300
# include
# include
namespace luabind { namespace detail { namespace has_get_pointer_ {
template
struct impl> {
BOOST_STATIC_CONSTANT(bool, value = true);
typedef boost::mpl::bool_ type;
};
template
struct impl>: impl> { };
template
struct impl>: impl> { };
template
struct impl>: impl> { };
}}
using boost::get_pointer;
}
# else // if BOOST_VERSION < 105300
// Not standard conforming: add function to ::std(::tr1)
namespace std {
# if defined(_MSC_VER) && _MSC_VER < 1700
namespace tr1 {
# endif
template
T * get_pointer(shared_ptr const& p) { return p.get(); }
# if defined(_MSC_VER) && _MSC_VER < 1700
} // namespace tr1
# endif
} // namespace std
#endif // if BOOST_VERSION < 105300 / else
namespace luabind {
using std::get_deleter;
template
struct default_converter >:
detail::shared_ptr_converter > {};
template
struct default_converter const&>:
detail::shared_ptr_converter > {};
} // namespace luabind
#endif // if smart pointers are available
#endif // LUABIND_STD_SHAREDPTR_CONVERTER_HPP_INCLUDED