Landing: 5154144864a6

Project / Subsystem

gcc / libstdc++

Date

2026-04-22

Author

Jonathan Wakely

Commit

5154144864a669c722fbb2170e79416c3ae5ff50

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
5154144864a669c722fbb2170e79416c3ae5ff50
source_type
github
headline
Libstdc++ Constrains Tuple Move Constructor for C++20
tldr
The libstdc++ `std::tuple` move constructor is now constrained in C++20 mode, ensuring it's only available when all elements are move-constructible.
author
Jonathan Wakely
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • tuple
  • move constructor
  • c++20
  • constraints
discussion_id_link
bugzilla_pr
date
2026-04-22T00:00:00.000Z

The std::tuple move constructor in libstdc++ is now constrained in C++20 mode. This ensures that the move constructor is only available when all element types within the tuple are move-constructible. Before this change, the move constructor could be implicitly defined as deleted even if non-move-constructible types were present, due to an unconstrained constructor in the underlying implementation. The constraint is implemented using a requires-clause.