C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Subscript aliasing

From: Jan Schultke <janschultke_at_[hidden]>
Date: Fri, 8 Mar 2024 00:19:26 +0100
You can have your cake and eat it with existing features.

Make three members float x, y, z, then define an operator[].

>From personal experience, it's a little bit tricky to get optimal
codegen; a std::memcpy-based approach usually does the trick.

Received on 2024-03-07 23:19:38