[meta.unary.comp]

# 21 Metaprogramming library [[meta]](./#meta)

## 21.3 Metaprogramming and type traits [[type.traits]](type.traits#meta.unary.comp)

### 21.3.6 Unary type traits [[meta.unary]](meta.unary#comp)

#### 21.3.6.3 Composite type traits [meta.unary.comp]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/meta.tex#L1014)

The templates specified in Table [53](#tab:meta.unary.comp "Table 53: Composite type category predicates") provide convenient compositions of the primary type categories,
corresponding to the descriptions given in subclause [[basic.types]](basic.types "6.9 Types")[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/meta.tex#L1019)

For any given type T, the result of applying one of these templates toT and to cv T shall yield the same result[.](#2.sentence-1)

Table [53](#tab:meta.unary.comp) — Composite type category predicates [[tab:meta.unary.comp]](./tab:meta.unary.comp)  

| [ð](#tab:meta.unary.comp-row-1)<br>**Template** | **Condition** | **Comments** |
| --- | --- | --- |
| [ð](#tab:meta.unary.comp-row-2)<br>template<class T>   struct is_reference; | T is an lvalue reference or an rvalue reference |  |
| [ð](#tab:meta.unary.comp-row-3)<br>template<class T>   struct is_arithmetic; | T is an arithmetic type ([[basic.fundamental]](basic.fundamental "6.9.2 Fundamental types")) |  |
| [ð](#tab:meta.unary.comp-row-4)<br>template<class T>   struct is_fundamental; | T is a fundamental type ([[basic.fundamental]](basic.fundamental "6.9.2 Fundamental types")) |  |
| [ð](#tab:meta.unary.comp-row-5)<br>template<class T>   struct is_object; | T is an object type ([[basic.types.general]](basic.types.general#term.object.type "6.9.1 General")) |  |
| [ð](#tab:meta.unary.comp-row-6)<br>template<class T>   struct is_scalar; | T is a scalar type ([[basic.types.general]](basic.types.general#term.scalar.type "6.9.1 General")) |  |
| [ð](#tab:meta.unary.comp-row-7)<br>template<class T>   struct is_compound; | T is a compound type ([[basic.compound]](basic.compound "6.9.4 Compound types")) |  |
| [ð](#tab:meta.unary.comp-row-8)<br>template<class T>   struct is_member_pointer; | T is a pointer-to-member type ([[basic.compound]](basic.compound "6.9.4 Compound types")) |  |
