Skip to content

error: no named 'auto_ptr' in namespace 'std' #143859

Closed
@mrashad32

Description

@mrashad32

Hi all,

Some of the libc++ tests that use std::auto_ptr (like [this one]) 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!test-suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions