diff options
Diffstat (limited to 'libcxx/test')
18 files changed, 58 insertions, 1 deletions
diff --git a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp new file mode 100644 index 00000000000..3764dcb250e --- /dev/null +++ b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <memory> + +// template <class X> +// class auto_ptr; +// +// In C++17, auto_ptr has been removed. +// However, for backwards compatibility, if _LIBCPP_NO_REMOVE_AUTOPTR +// is defined before including <memory>, then auto_ptr will be restored. + +#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR + +#include <memory> +#include <type_traits> + +int main() +{ + std::auto_ptr<int> p; +} diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp index 2c6acb5af12..eff8318fed6 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp @@ -13,6 +13,8 @@ // auto_ptr& operator=(auto_ptr& a) throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp index aeea7dec9e3..a9bb663c673 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp @@ -13,6 +13,8 @@ // auto_ptr(auto_ptr& a) throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp index 6809073c2d0..bb68eac2617 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp @@ -13,6 +13,8 @@ // template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp index 27ba0e513e4..5f97c7d7903 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp @@ -13,6 +13,8 @@ // auto_ptr(auto_ptr& a) throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp index e29ff2e7824..abb7aae5f0b 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp @@ -13,6 +13,8 @@ // explicit auto_ptr(X* p =0) throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp index 6f53581af42..020ffcb6275 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp @@ -13,6 +13,8 @@ // auto_ptr& operator=(auto_ptr_ref<X> r) throw() +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp index 375780527cf..9540d17a5e3 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp @@ -13,6 +13,8 @@ // auto_ptr(auto_ptr_ref<X> r) throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp index 00c0f6d30ca..fc333f91c35 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp @@ -13,6 +13,8 @@ // template<class Y> operator auto_ptr<Y>() throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp index a5db81e6c63..f098c9332a1 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp @@ -13,6 +13,8 @@ // template<class Y> operator auto_ptr_ref<Y>() throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp index fce9332df84..2bacf8d30d1 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp @@ -13,6 +13,8 @@ // X& operator*() const throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp index dd5669563e3..ace2f446438 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp @@ -13,6 +13,8 @@ // X& operator*() const throw(); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <cassert> diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp index 5860eb41114..bcd1afe532b 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp @@ -16,6 +16,8 @@ #include <memory> #include <cassert> +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include "../A.h" void diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp index cdbdd73ab72..8021ab6d208 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp @@ -16,6 +16,8 @@ #include <memory> #include <cassert> +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include "../A.h" void diff --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp index 256563439a1..dee3cce14fd 100644 --- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp +++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp @@ -17,6 +17,8 @@ // ... // }; +// REQUIRES-ANY: c++98, c++03, c++11, c++14 + #include <memory> #include <type_traits> diff --git a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp index 7c3ac462c28..0867a01804f 100644 --- a/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp +++ b/libcxx/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/auto_pointer.pass.cpp @@ -9,7 +9,7 @@ // libc++ cannot safely provide the auto_ptr constructor without rvalue // references. -// XFAIL: c++98, c++03 +// REQUIRES-ANY: c++11, c++14 // <memory> diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp index 21cdf4a13e4..2957df2bd66 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp @@ -10,6 +10,7 @@ // <memory> // shared_ptr +// REQUIRES-ANY: c++98, c++03, c++11, c++14 // template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r); diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp index f8fdb7a0947..59aef220546 100644 --- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp +++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp @@ -10,6 +10,7 @@ // <memory> // template<class Y> explicit shared_ptr(auto_ptr<Y>&& r); +// REQUIRES-ANY: c++98, c++03, c++11, c++14 #include <memory> |