================ @@ -1511,6 +1511,43 @@ Attributes (N2335) C2 ``#embed`` (N3017) C23 C89, C++ ============================================ ================================ ============= ============= +Builtin type aliases +==================== + +Clang provides a few builtin aliases to improve the throughput of certain metaprogramming facilities. + +__common_type +------------- + +.. code-block:: c++ + template <template <class... Args> class BaseTemplate, + template <class TypeMember> class HasTypeMember, + class HasNoTypeMember, + class... Ts> + using __common_type = ...; + +This alias is used for implementing ``std::common_type``. If ``std::common_type`` should contain a ``type`` member, +it is an alias to ``HasTypeMember<TheCommonType>``. Otherwise it is an alias to ``HasNoTypeMember``. The +``BaseTemplate`` is usually ``std::common_type``. ``Ts`` are the arguments to ``std::common_type``. + +__type_pack_element +------------------- + +.. code-block:: c++ + template <std::size_t Index, class... Ts> + using __type_pack_element = ...; + +This alias returns the type at ``Index`` in the parameter pack ``Ts``. + +__make_integer_seq +------------------ + +.. code-block:: c++ + template <template <class IntSeqT, IntSeqT... Ints> class IntSeq, class T, class N> ---------------- frederick-vs-ja wrote:
```suggestion template <template <class IntSeqT, IntSeqT... Ints> class IntSeq, class T, T N> ``` Typo? https://github.com/llvm/llvm-project/pull/99473 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits