libstdc++-v3/testsuite/20_util/smartptr.adapt/inout_ptr/shared_ptr_neg.cc
raw| 1 | // { dg-do compile { target c++23 } } |
| 2 | |
| 3 | #include <memory> |
| 4 | |
| 5 | std::shared_ptr<int> sp; |
| 6 | auto iop = std::inout_ptr(sp); // { dg-error "here" } |
| 7 | std::shared_ptr<long> sp2; |
| 8 | std::default_delete<int> d; |
| 9 | auto iop2 = std::inout_ptr(sp2, d); // { dg-error "here" } |
| 10 | |
| 11 | // { dg-error "can not be used" "" { target *-*-* } 0 } |