Issue |
143859
|
Summary |
error: no named 'auto_ptr' in namespace 'std'
|
Labels |
new issue
|
Assignees |
|
Reporter |
mrashad32
|
Hi all,
Some of the libc++ tests that use std::auto_ptr (like[ [this one]](https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp)) currently fail to compile with LLVM 19 when using -std=c++20.
The error is:
`error: no member named 'auto_ptr' in namespace 'std'`
This is expected, since auto_ptr was removed in C++17.
However, in older versions like LLVM 17, these tests could still be compiled by defining: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
Would it make sense to add this is macro in test builds, to allow testing auto_ptr-related code for those maintaining legacy projects? _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
Thanks!
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs