Files
cppdraft_translate/cppdraft/meta/unary/comp.md
2025-10-25 03:02:53 +03:00

2.3 KiB

[meta.unary.comp]

21 Metaprogramming library [meta]

21.3 Metaprogramming and type traits [type.traits]

21.3.6 Unary type traits [meta.unary]

21.3.6.3 Composite type traits [meta.unary.comp]

1

#

The templates specified in Table 53 provide convenient compositions of the primary type categories, corresponding to the descriptions given in subclause [basic.types].

2

#

For any given type T, the result of applying one of these templates toT and to cv T shall yield the same result.

Table 53 — Composite type category predicates [tab:meta.unary.comp]

🔗
Template
Condition Comments
🔗
template struct is_reference;
T is an lvalue reference or an rvalue reference
🔗
template struct is_arithmetic;
T is an arithmetic type ([basic.fundamental])
🔗
template struct is_fundamental;
T is a fundamental type ([basic.fundamental])
🔗
template struct is_object;
T is an object type ([basic.types.general])
🔗
template struct is_scalar;
T is a scalar type ([basic.types.general])
🔗
template struct is_compound;
T is a compound type ([basic.compound])
🔗
template struct is_member_pointer;
T is a pointer-to-member type ([basic.compound])