//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // template class auto_ptr; // template operator auto_ptr() throw(); // REQUIRES: c++98 || c++03 || c++11 || c++14 #define _LIBCPP_DISABLE_DEPRECATION_WARNINGS #include #include #include "test_macros.h" #include "../AB.h" std::auto_ptr source() { return std::auto_ptr(new B(1)); } void test() { std::auto_ptr ap2(source()); } int main(int, char**) { test(); return 0; }