Issue 146838
Summary [Clang] Implement the `__builtin_type_order` intrinsic for P2830R10 Constexpr Type Ordering
Labels clang:frontend, c++26
Assignees
Reporter frederick-vs-ja
    Recently, GCC & libstdc++ has implemented [P2830R10](https://wg21.link/p2830r10) Constexpr Type Ordering (per gcc-mirror/gcc@29c7661c6f92d80f63a9a3cc37f3dc790a161f3f). A new intrinsic `__builtin_type_order` is added for this. It's probably better to have this intrinsic in Clang to improve compatibility with GCC.

If I understood correctly, `__builtin_type_order(T, U)` returns a `std::strong_ordering` value equal to `strcmp(mangled-name(T), mangled-name(U)) <=> 0`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to