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:
committed by
Stefan Seefeld
parent
2b7842a39f
commit
7c5e478432
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user