Skip to content

[specialized.algorithms] Remove typename after new#8420

Merged
tkoeppe merged 1 commit into
cplusplus:mainfrom
AlisdairM:remove_typename_after_new
Nov 15, 2025
Merged

[specialized.algorithms] Remove typename after new#8420
tkoeppe merged 1 commit into
cplusplus:mainfrom
AlisdairM:remove_typename_after_new

Conversation

@AlisdairM

Copy link
Copy Markdown
Contributor

The typename keyword is not needed to identify a dependent type in a new expression.

This PR contributes to #3637 by resolving all current uses of typename in a new expression in the library.

@frederick-vs-ja

Copy link
Copy Markdown
Contributor

Hmm, I still think it would be cleaner to use iter-value-type here. See also #7844.

@AlisdairM

Copy link
Copy Markdown
Contributor Author

I agree, but that seemed a much bigger change.
We can resolve that preferred direction when LWG can take a look, hopefully for C++29.

The `typename` keyword is not needed to identify a dependant
type in a `new` expression.
@AlisdairM AlisdairM force-pushed the remove_typename_after_new branch from 3a90581 to 1713b56 Compare November 12, 2025 23:00
@tkoeppe tkoeppe merged commit 19ad41d into cplusplus:main Nov 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants