News for hackers. Stuff that matters.
Re:Fun with C++26 reflection: Keyword Arguments by Tsche on Tuesday February 11, 2025 @04:19PM (#43018513)
This is absolutely possible, even currently - albeit in a very much non-portable way. For example boost::pfr and my own (wip) repr library have the required machinery for this.
Re:Fun with C++26 reflection: Keyword Arguments by vouwfietsman on Thursday February 13, 2025 @05:11AM (#43034498)
Interesting! There seem to be a lot of limitations though:

> Boost.PFR library works with types that satisfy the requirements of SimpleAggregate: aggregate types without base classes, const fields, references, or C arrays:

And in general seems to be dependent on C++20 for getting field names.

Do you know how this works? Initializer lists seem somehow involved.