C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Allow chaining of -> for normal pointers

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Sun, 8 Jan 2023 14:45:11 +0100
On 07/01/2023 21:45, Jens Maurer via Std-Proposals wrote:
> We know that about any change to the rules of C++ will
> change SFINAE results such as shown above, but that is
> usually acceptable. Your example checks whether one
> can use "x->size()" on "std::string **x", and the answer
> was "no" before and now is "yes" --- exactly what the
> proposal intends to achieve. So this particular example
> is not a counterargument against the proposal.

Sure, I was just replying to the part of

> relies on SFINAE, but I tried writing a template function with
> "std::enable_if" and I don't actually think that this change to the
> core language would break any SFINAE achieved with "std::enable_if".

of the original message.

Short of introducing new syntax that is outright illegal today, pretty
much anything can be detected via enable_if, so this line of reasoning
("will change some SFINAE") shouldn't be of much concern if one plans to
evolve the language, should it?

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo_at_[hidden] | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Received on 2023-01-08 13:45:14