Landing: 874605e8c44c

Project / Subsystem

gcc / libstdc++

Date

2026-07-16

Author

Jakub Jelinek

Commit

874605e8c44ca4823cedb2881cdbd91f38cff5bc

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
874605e8c44ca4823cedb2881cdbd91f38cff5bc
source_type
github
headline
libstdc++: Prevent specialization of std::indirect and std::polymorphic
tldr
std::indirect and std::polymorphic are marked to disallow user specialization, following C++ standard proposals.
author
Jakub Jelinek
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • templates
  • C++ standard
discussion_id_link
bugzilla_pr
date
2026-07-16T00:00:00.000Z

This commit prevents users from specializing the std::indirect and std::polymorphic templates in libstdc++. These templates, introduced based on C++ standard proposals P3019R14, already have inherent restrictions that preclude user specialization. By marking them with _GLIBCXX_NO_SPECIALIZATIONS, the compiler enforces these restrictions, enhancing type safety and preventing potential misuse.