Skip to content

libc++ should (behind a macro that can enable and disable) add [[nodiscard]] unique_ptr::release #30246

@chandlerc

Description

@chandlerc
Bugzilla Link 30898
Version unspecified
OS All
CC @mclow

Extended Description

We have a C++ annotation ([[nodiscard]]) which allows warnings when returned values are ignored. This should be possible to enable on std::unique_ptr<...>::release()'s returned pointer so that we don't accidentally leak memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillalibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions