Bug 114455 - [C++26] P2748R5 - Disallow binding a returned reference to a temporary
Summary: [C++26] P2748R5 - Disallow binding a returned reference to a temporary
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 14.0
: P3 normal
Target Milestone: ---
Assignee: Jason Merrill
URL:
Keywords: accepts-invalid
Depends on:
Blocks: c++26-core
  Show dependency treegraph
 
Reported: 2024-03-25 11:06 UTC by Jakub Jelinek
Modified: 2024-04-28 20:28 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2024-03-25 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2024-03-25 11:06:13 UTC
See <https://wg21.link/P2748R5>.
Comment 1 Marek Polacek 2024-03-25 17:18:36 UTC
Confirmed.  I'm interested.
Comment 2 Marek Polacek 2024-04-01 16:35:38 UTC
Implemented in r14-9738-gbba118db3f63cb for GCC 14.0.

commit bba118db3f63cb1e3953a014aa3ac2ad89908950
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Mar 28 21:33:57 2024 -0400

    c++: C++26 returning reference to temporary