Date: Wed, 21 May 2025 10:17:51 +0200
You mean the ternary conditional operator?
I see no comma.
-----Ursprüngliche Nachricht-----
Von:Simon W via Std-Proposals <std-proposals_at_[hidden]>
Gesendet:Mi 21.05.2025 10:12
Betreff:[std-proposals] Hope that std::optional and comma expressions can work this way
An:std-proposals_at_[hidden];
CC:Simon W <inte2012_at_[hidden]>;
The comma expression requires that the expressions on both sides of the colon are of the same type. But I think this syntax should be accepted:
bool AllInUniversial();
std::optional<int> r = AllInUniversial() ? 42 : std::nullopt;
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2025-05-21 08:25:21