| 1 | // { dg-do compile } |
| 2 | |
| 3 | // 2007-02-04 Benjamin Kosnik <[email protected]> |
| 4 | // |
| 5 | // Copyright (C) 2007-2025 Free Software Foundation, Inc. |
| 6 | // |
| 7 | // This file is part of the GNU ISO C++ Library. This library is free |
| 8 | // software; you can redistribute it and/or modify it under the |
| 9 | // terms of the GNU General Public License as published by the |
| 10 | // Free Software Foundation; either version 3, or (at your option) |
| 11 | // any later version. |
| 12 | // |
| 13 | // This library is distributed in the hope that it will be useful, |
| 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | // GNU General Public License for more details. |
| 17 | // |
| 18 | // You should have received a copy of the GNU General Public License |
| 19 | // along with this library; see the file COPYING3. If not see |
| 20 | // <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | #include <tr1/memory> |
| 23 | |
| 24 | namespace std { |
| 25 | namespace tr1 { |
| 26 | |
| 27 | // [2.2.2] Class bad_weak_ptr |
| 28 | class bad_weak_ptr; |
| 29 | |
| 30 | // [2.2.3] Class template shared_ptr |
| 31 | template<class T> class shared_ptr; |
| 32 | |
| 33 | // [2.2.3.6] shared_ptr comparisons |
| 34 | template<class T, class U> bool operator==(shared_ptr<T> const& a, shared_ptr<U> const& b); |
| 35 | template<class T, class U> bool operator!=(shared_ptr<T> const& a, shared_ptr<U> const& b); |
| 36 | template<class T, class U> bool operator<(shared_ptr<T> const& a, shared_ptr<U> const& b); |
| 37 | |
| 38 | // [2.2.3.8] shared_ptr specialized algorithms |
| 39 | template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b); |
| 40 | |
| 41 | // [2.2.3.9] shared_ptr casts |
| 42 | template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const& r); |
| 43 | template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const& r); |
| 44 | template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const& r); |
| 45 | |
| 46 | // [2.2.3.7] shared_ptr I/O |
| 47 | template<class E, class T, class Y> |
| 48 | basic_ostream<E, T>& operator<< (basic_ostream<E, T>& os, shared_ptr<Y> const& p); |
| 49 | |
| 50 | // [2.2.3.10] shared_ptr get_deleter |
| 51 | template<class D, class T> D* get_deleter(shared_ptr<T> const& p); |
| 52 | |
| 53 | // [2.2.4] Class template weak_ptr |
| 54 | template<class T> class weak_ptr; |
| 55 | |
| 56 | // [2.2.4.6] weak_ptr comparison |
| 57 | template<class T, class U> bool operator<(weak_ptr<T> const& a, weak_ptr<U> const& b); |
| 58 | |
| 59 | // [2.2.4.7] weak_ptr specialized algorithms |
| 60 | template<class T> void swap(weak_ptr<T>& a, weak_ptr<T>& b); |
| 61 | |
| 62 | // [2.2.5] Class enable_shared_from_this |
| 63 | template<class T> class enable_shared_from_this; |
| 64 | } // namespace tr1 |
| 65 | } // namespace std |