2
0
mirror of https://github.com/boostorg/python.git synced 2026-02-02 21:12:15 +00:00

Fix autoptr/unique_ptr ifdef for VS2017.

This commit is contained in:
Gary Furnish
2017-08-20 21:56:52 -06:00
committed by Stefan Seefeld
parent 2b7842a39f
commit 7c5e478432
4 changed files with 7 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ namespace detail
template <class U>
void dispatch(U* x, detail::true_) const
{
#if __cplusplus < 201103L
#if defined(BOOST_NO_CXX11_SMART_PTR)
std::auto_ptr<U> owner(x);
dispatch(owner, detail::false_());
#else
@@ -63,7 +63,7 @@ namespace detail
void* memory = holder::allocate(this->m_self, offsetof(instance_t, storage), sizeof(holder));
try {
#if __cplusplus < 201103L
#if defined(BOOST_NO_CXX11_SMART_PTR)
(new (memory) holder(x))->install(this->m_self);
#else
(new (memory) holder(std::move(x)))->install(this->m_self);

View File

@@ -21,7 +21,7 @@ struct make_ptr_instance
template <class Arg>
static inline Holder* construct(void* storage, PyObject*, Arg& x)
{
#if __cplusplus < 201103L
#if defined(BOOST_NO_CXX11_SMART_PTR)
return new (storage) Holder(x);
#else
return new (storage) Holder(std::move(x));

View File

@@ -106,7 +106,7 @@ struct pointer_holder_back_reference : instance_holder
template <class Pointer, class Value>
inline pointer_holder<Pointer,Value>::pointer_holder(Pointer p)
#if __cplusplus < 201103L
#if defined(BOOST_NO_CXX11_SMART_PTR)
: m_p(p)
#else
: m_p(std::move(p))
@@ -116,7 +116,7 @@ inline pointer_holder<Pointer,Value>::pointer_holder(Pointer p)
template <class Pointer, class Value>
inline pointer_holder_back_reference<Pointer,Value>::pointer_holder_back_reference(Pointer p)
#if __cplusplus < 201103L
#if defined(BOOST_NO_CXX11_SMART_PTR)
: m_p(p)
#else
: m_p(std::move(p))

View File

@@ -135,7 +135,7 @@ struct py_function
{}
py_function(py_function const& rhs)
#if __cplusplus < 201103L
#if defined(BOOST_NO_CXX11_SMART_PTR)
: m_impl(rhs.m_impl)
#else
: m_impl(std::move(rhs.m_impl))
@@ -168,7 +168,7 @@ struct py_function
}
private:
#if __cplusplus < 201103L
#if defined(BOOST_NO_CXX11_SMART_PTR)
mutable std::auto_ptr<py_function_impl_base> m_impl;
#else
mutable std::unique_ptr<py_function_impl_base> m_impl;