// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
#include <memory>
#include <testsuite_hooks.h>
{
reset_count_struct __attribute__((unused)) reset;
- std::auto_ptr<A> A_default;
+ std::auto_ptr<A> A_default; // { dg-warning "deprecated" "" { target c++11 } }
VERIFY( A_default.get() == 0 );
VERIFY( A::ctor_count == 0 );
VERIFY( A::dtor_count == 0 );
VERIFY( B::ctor_count == 0 );
VERIFY( B::dtor_count == 0 );
- std::auto_ptr<A> A_from_A(new A);
+ std::auto_ptr<A> A_from_A(new A); // { dg-warning "deprecated" "" { target c++11 } }
VERIFY( A_from_A.get() != 0 );
VERIFY( A::ctor_count == 1 );
VERIFY( A::dtor_count == 0 );
VERIFY( B::ctor_count == 0 );
VERIFY( B::dtor_count == 0 );
- std::auto_ptr<A> A_from_B(new B);
+ std::auto_ptr<A> A_from_B(new B); // { dg-warning "deprecated" "" { target c++11 } }
VERIFY( A_from_B.get() != 0 );
VERIFY( A::ctor_count == 2 );
VERIFY( A::dtor_count == 0 );
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <memory>
#include <testsuite_hooks.h>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <memory>
#include <testsuite_hooks.h>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <memory>
#include <testsuite_hooks.h>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <memory>
#include <testsuite_hooks.h>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <memory>
#include <testsuite_hooks.h>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <memory>
#include <testsuite_hooks.h>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr [lib.auto.ptr]
+// C++03 20.4.5 Template class auto_ptr [lib.auto.ptr]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <memory>
#include <testsuite_hooks.h>
// { dg-do compile }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
// Copyright (C) 2002-2023 Free Software Foundation, Inc.
//
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// 20.4.5 Template class auto_ptr negative tests [lib.auto.ptr]
-
-// { dg-options "-std=c++98" }
+// C++03 20.4.5 Template class auto_ptr negative tests [lib.auto.ptr]
#include <memory>
#include <testsuite_hooks.h>
// { dg-do compile }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
// Copyright (C) 2007-2023 Free Software Foundation, Inc.
//
// <http://www.gnu.org/licenses/>.
-// This file tests explicit instantiation of library containers.
-
-// { dg-options "-std=c++98" }
+// This file tests explicit instantiation of library templates.
#include <memory>
// TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <tr1/memory>
#include <testsuite_hooks.h>
// TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <tr1/memory>
#include <testsuite_hooks.h>
// TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared]
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
#include <tr1/memory>
#include <testsuite_hooks.h>
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=c++98 -fno-show-column" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
// 2.2.3 Class template shared_ptr [tr.util.smartptr.shared]
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
// TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared]
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=c++98" }
+// { dg-add-options using-deprecated }
+// { dg-warning "auto_ptr. is deprecated" "" { target c++11 } 0 }
// TR1 2.2.2 Template class shared_ptr [tr.util.smartptr.shared]