C++ Logo


Advanced search

Re: [std-proposals] Add operator for element wise multiplication.

From: Patrik Tegelberg <patrik_at_[hidden]>
Date: Mon, 16 May 2022 10:31:01 +0200

Overloading pointer to member actually has correct enough precedence to not be dangerous.

I think I tried, early, to overload .* but that did not compile and I did not think to try ->*.

There is also no ->*= but that is a minor inconvenience. With RVO v1 = v1 ->* v2; seem to have no cost, awesome.

So I implemented ->*.


With that I’ll concede defeat.

Thanks for your time.

I very much support your position to protect the language from pollution.





Sent from Mail for Windows


From: Sebastian Wittmeier via Std-Proposals
Sent: Sunday, 15 May 2022 22:08
To: std-proposals_at_[hidden]
Cc: Sebastian Wittmeier
Subject: Re: [std-proposals] Add operator for element wise multiplication.


Hi Patrik,

operator->* (pointer-to-member) can be overridden and is very similar in precedence to multiplication (one step higher only).




Sebastian Wittmeier


Received on 2022-05-16 08:31:06