Its possible something like this already exists in the latest versions of C++ but if so I am not aware of itAs of C++20, one could use designated initialisers to achieve this.Whether it's a good idea in C++ is another matter.https://godbolt.org/z/cd8szq-- Richard Hodgeshodges.r@gmail.comoffice: +442032898513home: +376841522mobile: +376380212
Its possible something like this already exists in the latest versions of C++ but if so I am not aware of it