Skip to content

Commit a72848c

Browse files
committed
Fix autoptr/unique_ptr ifdef for VS2017.
1 parent c2424bc commit a72848c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

include/boost/python/make_constructor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace detail
4545
template <class U>
4646
void dispatch(U* x, detail::true_) const
4747
{
48-
#if __cplusplus < 201103L
48+
#if defined(BOOST_NO_CXX11_SMART_PTR)
4949
std::auto_ptr<U> owner(x);
5050
dispatch(owner, detail::false_());
5151
#else
@@ -63,7 +63,7 @@ namespace detail
6363

6464
void* memory = holder::allocate(this->m_self, offsetof(instance_t, storage), sizeof(holder));
6565
try {
66-
#if __cplusplus < 201103L
66+
#if defined(BOOST_NO_CXX11_SMART_PTR)
6767
(new (memory) holder(x))->install(this->m_self);
6868
#else
6969
(new (memory) holder(std::move(x)))->install(this->m_self);

include/boost/python/object/make_ptr_instance.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct make_ptr_instance
2121
template <class Arg>
2222
static inline Holder* construct(void* storage, PyObject*, Arg& x)
2323
{
24-
#if __cplusplus < 201103L
24+
#if defined(BOOST_NO_CXX11_SMART_PTR)
2525
return new (storage) Holder(x);
2626
#else
2727
return new (storage) Holder(std::move(x));

include/boost/python/object/pointer_holder.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct pointer_holder_back_reference : instance_holder
106106

107107
template <class Pointer, class Value>
108108
inline pointer_holder<Pointer,Value>::pointer_holder(Pointer p)
109-
#if __cplusplus < 201103L
109+
#if defined(BOOST_NO_CXX11_SMART_PTR)
110110
: m_p(p)
111111
#else
112112
: m_p(std::move(p))
@@ -116,7 +116,7 @@ inline pointer_holder<Pointer,Value>::pointer_holder(Pointer p)
116116

117117
template <class Pointer, class Value>
118118
inline pointer_holder_back_reference<Pointer,Value>::pointer_holder_back_reference(Pointer p)
119-
#if __cplusplus < 201103L
119+
#if defined(BOOST_NO_CXX11_SMART_PTR)
120120
: m_p(p)
121121
#else
122122
: m_p(std::move(p))

include/boost/python/object/py_function.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ struct py_function
135135
{}
136136

137137
py_function(py_function const& rhs)
138-
#if __cplusplus < 201103L
138+
#if defined(BOOST_NO_CXX11_SMART_PTR)
139139
: m_impl(rhs.m_impl)
140140
#else
141141
: m_impl(std::move(rhs.m_impl))
@@ -168,7 +168,7 @@ struct py_function
168168
}
169169

170170
private:
171-
#if __cplusplus < 201103L
171+
#if defined(BOOST_NO_CXX11_SMART_PTR)
172172
mutable std::auto_ptr<py_function_impl_base> m_impl;
173173
#else
174174
mutable std::unique_ptr<py_function_impl_base> m_impl;

0 commit comments

Comments
 (0)