<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/143859>143859</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            error: no named 'auto_ptr' in namespace 'std'
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mrashad32
      </td>
    </tr>
</table>

<pre>
    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!
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUlN9urDYQxp_G3IyCwCywXHDB_qEnUk4SJdtzTq-QgcnixtjIY3azb1-Z7LZVpV5EQkKM7fFvvvkGQSSPGrFk6Yalu0DMbjC2HK2gQfQJD1rTX8pvEoRSjG9ZVLGoejUjgnkDNyAo2XaMbxjfgENyBG4QDmZCINezpGJJJWZnmslZYHyt5DuydAMs3bhBEhiNLN35h68H5ybyR3jNeH2UbpjbsDMj47VSp9vrbrLmT-wc43WrTMt4PQqp_aJsu48PxmvPwXjt7-f17KSSTiL5jTgae7kGQxqFdZOz__0OaRAW-_8Jh5-KMV7fymr-CCdBFHbTxHjBeAHdbC1qpy7wJqQCZ6Az4yQVwlm6AR4efnyHuIDzgBpmkvoId4tYu6uSPApZVB0GBLTWWJCLKov0LIuWGEsq0AZGHFu0oMWIPTCe35gYz0HqJU6T6NCvLXrkLIuW3JJAEuDHhJ3zxW6BpO4Q_m7WWRBYHM0Je59q-4kW5x7tmznjCa0_JTUY1aOFE1qSRhP4Fl9rzP0ONyDh1RydmVUP5KRS0OJNlh7aC_T4JrXUR1_Z3a55uN9sn5-b3f1rtXnYN7v988t-Wx3unx6bn9XL4_3jb6-fivxcUkoHo3hHINT-MgOi78FdqxxFZ40n9RDQzlL1tJAZb2tzXuK-Dbfi7ywq4bCHzvQIb8aCGwwheKc5sWCCwqPoLnB1I7Gkhhv0_nFh3v76FefNy_7704_9rql-Pzw1z4eXT-rDIPQ7MR4HfZn0RVKIAMs4XxV5vE6KLBhKXmCSFiLKcmzXaR53qyLheYQiS7M8SfNAljziaZTFPFqnSZyFSbReFau1ECmKbBUhW0U4CqlCPzahscdAEs1YxqtknRaBEi0qWgafc41nWFYZ5_4_YMtl1tr5SGwVKUmO_knjpFNY_tuHXzBgMFtVfnnUFzY_w1f4U8n_CgAA___MSot2">