cppfront
cppfront copied to clipboard
feat: add _computed-type-id_ for qualified `type_of` and `decltype`
My next code which I couldn't update:
magnitude2d: <Number> type ==
decltype(_cartesian_magnitude2d(std::type_identity<std::tuple<Unit, Number>>()))::type;
vector2d: <Number> type ==
std::type_identity_t<decltype(_cartesian_vector2d(std::type_identity<std::tuple<Unit, Number>>()))>::type;
The Cpp1 syntax uses computed-type-specifier, which I modeled with computed-type-id. Supporting C++26's pack indexing (in type-ids) was a low-hanging fruit.
Here's Clang compiling the pack indexing test,
after enabling the commented out test case and manually adding the typename:
https://cpp2.godbolt.org/z/avqqqGb6x.