+2017-04-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/backward/auto_ptr.h: Ignore deprecated warnings from use
+ of auto_ptr.
+ * include/bits/shared_ptr.h: Likewise.
+ * include/bits/shared_ptr_base.h: Likewise.
+ * include/bits/unique_ptr.h: Likewise.
+ * libstdc++-v3/testsuite/20_util/default_delete/48631_neg.cc: Adjust
+ dg-error lineno.
+ * libstdc++-v3/testsuite/20_util/default_delete/void_neg.cc: Likewise.
+ * libstdc++-v3/testsuite/20_util/unique_ptr/assign/48635_neg.cc:
+ Likewise.
+ * libstdc++-v3/testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc:
+ Likewise.
+
2017-04-20 Edward Smith-Rowland <3dw4rd@verizon.net>
PR libstdc++/68397 std::tr1::expint fails ... long double arguments.
auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { }
} _GLIBCXX_DEPRECATED;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/**
* @brief A simple smart pointer providing strict ownership semantics.
: _M_t(__u.release(), deleter_type()) { }
#endif
+#pragma GCC diagnostic pop
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
: __shared_ptr<_Tp>(__r) { }
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
template<typename _Yp, typename = _Constructible<auto_ptr<_Yp>>>
shared_ptr(auto_ptr<_Yp>&& __r);
+#pragma GCC diagnostic pop
#endif
// _GLIBCXX_RESOLVE_LIB_DEFECTS
}
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
template<typename _Yp>
_Assignable<auto_ptr<_Yp>>
operator=(auto_ptr<_Yp>&& __r)
this->__shared_ptr<_Tp>::operator=(std::move(__r));
return *this;
}
+#pragma GCC diagnostic pop
#endif
shared_ptr&
_GLIBCXX_BEGIN_NAMESPACE_VERSION
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
template<typename> class auto_ptr;
+#pragma GCC diagnostic pop
#endif
/**
}
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
// Special case for auto_ptr<_Tp> to provide the strong guarantee.
template<typename _Tp>
explicit
__shared_count(std::auto_ptr<_Tp>&& __r);
+#pragma GCC diagnostic pop
#endif
// Special case for unique_ptr<_Tp,_Del> to provide the strong guarantee.
#endif
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
// Postcondition: use_count() == 1 and __r.get() == 0
template<typename _Yp, typename = _Compatible<_Yp>>
__shared_ptr(auto_ptr<_Yp>&& __r);
+#pragma GCC diagnostic pop
#endif
constexpr __shared_ptr(nullptr_t) noexcept : __shared_ptr() { }
}
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
template<typename _Yp>
_Assignable<_Yp>
operator=(auto_ptr<_Yp>&& __r)
__shared_ptr(std::move(__r)).swap(*this);
return *this;
}
+#pragma GCC diagnostic pop
#endif
__shared_ptr&
*/
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
template<typename> class auto_ptr;
+#pragma GCC diagnostic pop
#endif
/// Primary template of default_delete, used by unique_ptr
{ }
#if _GLIBCXX_USE_DEPRECATED
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/// Converting constructor from @c auto_ptr
template<typename _Up, typename = _Require<
is_convertible<_Up*, _Tp*>, is_same<_Dp, default_delete<_Tp>>>>
unique_ptr(auto_ptr<_Up>&& __u) noexcept;
+#pragma GCC diagnostic pop
#endif
/// Destructor, invokes the deleter if the stored pointer is not null.
D d;
std::default_delete<B[]> db;
typedef decltype(db(&d)) type; // { dg-error "no match" }
-// { dg-error "no type" "" { target *-*-* } 108 }
+// { dg-error "no type" "" { target *-*-* } 111 }
{
std::default_delete<void> d;
d(nullptr); // { dg-error "here" }
- // { dg-error "incomplete" "" { target *-*-* } 74 }
+ // { dg-error "incomplete" "" { target *-*-* } 77 }
}
std::unique_ptr<int, D&> ud(nullptr, d);
ub = std::move(ud); // { dg-error "no match" }
ub2 = ud; // { dg-error "no match" }
-// { dg-error "no type" "" { target *-*-* } 301 }
+// { dg-error "no type" "" { target *-*-* } 307 }
std::unique_ptr<int[], B&> uba(nullptr, b);
std::unique_ptr<int[], D&> uda(nullptr, d);
uba = std::move(uda); // { dg-error "no match" }
-// { dg-error "no type" "" { target *-*-* } 560 }
+// { dg-error "no type" "" { target *-*-* } 566 }
}
std::unique_ptr<const A[]> cA3(p); // { dg-error "no matching function" }
std::unique_ptr<volatile A[]> vA3(p); // { dg-error "no matching function" }
std::unique_ptr<const volatile A[]> cvA3(p); // { dg-error "no matching function" }
- // { dg-error "no type" "" { target *-*-* } 467 }
+ // { dg-error "no type" "" { target *-*-* } 473 }
}
template<typename T>