Skip to content

Conversation

@eisenwave
Copy link
Member

Fixes #8456.
Fixes FI-4 (C++14 CD).

Note that this PR also fixes an example in [class.conv.fct] that becomes clearly incorrect after CWG1670 is applied.

@eisenwave eisenwave requested a review from jensmaurer November 9, 2025 15:35
@eisenwave eisenwave added this to the post-2025-11 milestone Nov 9, 2025
@eisenwave eisenwave force-pushed the motions-2025-11-cwg-2b branch from 7955549 to c40f633 Compare November 9, 2025 15:39
@frederick-vs-ja
Copy link
Contributor

Currently, there's one such use made invalid by CWG1670 in the library specification.

constexpr operator decltype(auto)() const noexcept { return value; }

It seems OK to replace operator decltype(auto) with operator decltype(value) without diverging from the intent. Do we want to fix the library wording in this PR, another PR, or a follow-up LWG issue?

@eisenwave
Copy link
Member Author

That's technically a normative change, and I would prefer to keep this PR minimal so we don't run into anything that prevents us from merging motions.

The fix of [class.conv.fct] was clearly just a minor editorial adjustment, but the operator decltype(auto) thing should be fixed elsewhere. Maybe that will even turn into an LWG issue; I hope not.

@eisenwave
Copy link
Member Author

You know what, I'm just going to submit an LWG issue for this.

@Dani-Hub
Copy link
Member

We have now LWG 4468 for this.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 10, 2025

Thanks, @Dani-Hub!

@t3nsor
Copy link
Contributor

t3nsor commented Nov 10, 2025

It seems to me that the entire paragraph "A conversion function template shall not have a deduced return type" should go away.

Technically, that might (?) actually be a normative change in that the current rule makes the template operator auto clearly ill-formed whereas if that rule is struck then it might be IFNDR under [temp.res.general], but there seems to be little value in having this special case.

@eisenwave
Copy link
Member Author

eisenwave commented Nov 10, 2025

It seems to me that the entire paragraph "A conversion function template shall not have a deduced return type" should go away.

I wouldn't be opposed, but that seems more like CWG issue material than a drive-by fix in this PR which applies the motions.

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.

[2025-11 CWG Motion 2b] P3921R0 issue 1670

5 participants