Skip to content

[class.temporary] The use of term "trivially copyable" may be wrong #5299

Closed
@frederick-vs-ja

Description

@frederick-vs-ja

When determining whether temporary object is allowed to be created during passing or returning, triviality of assignment operators is ignored ([class.temporary]/3, so does Itanium C++ ABI), which is inconsistent with the definition of trivially copyable class in [class.prop]/1.
Perhaps we should replace the use of "trivially copyable" in [class.temporary]/(1.2) with a new term.

May be related to CWG2434.

Activity

frederick-vs-ja

frederick-vs-ja commented on Aug 8, 2024

@frederick-vs-ja
ContributorAuthor

If the current resolution of CWG2868 gets adopted, we can just use "trivially returnable" here.

frederick-vs-ja

frederick-vs-ja commented on Apr 17, 2025

@frederick-vs-ja
ContributorAuthor

Fixed by #7695.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @frederick-vs-ja

        Issue actions

          [class.temporary] The use of term "trivially copyable" may be wrong · Issue #5299 · cplusplus/draft