C++ Logo

std-proposals

Advanced search

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

From: Bjorn Reese <breese_at_[hidden]>
Date: Tue, 10 May 2022 16:20:14 +0200
On 5/10/22 15:13, Patrik Tegelberg via Std-Proposals wrote:
> I often use vector math and usually make a small vector class
> overloading the math operators. I always lack a good option for element
> wise multiplication (Hadamard product). Divide becomes element wise
> divide, multiplication becomes the dot product and % becomes the cross
> product. There are no more operators with the correct precedence to
> overload. I suggest making another symbol, with multiplication
> precedence, available for overloading.

There is a proposal to add linear algebra, although they focus on the
functionality, not a compact mathematical notation:

   https://wg21.link/P1385

Received on 2022-05-10 14:22:16