cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

feat: add _computed-type-id_ for qualified `type_of` and `decltype`

Open JohelEGP opened this issue 1 year ago • 1 comments

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.

JohelEGP avatar Oct 07 '24 15:10 JohelEGP

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.

JohelEGP avatar Oct 07 '24 18:10 JohelEGP