[meta.trans.ref]

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

## 21.3 Metaprogramming and type traits [[type.traits]](type.traits#meta.trans.ref)

### 21.3.9 Transformations between types [[meta.trans]](meta.trans#ref)

#### 21.3.9.3 Reference modifications [meta.trans.ref]

[1](#1)

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

The templates specified in Table [58](#tab:meta.trans.ref "Table 58: Reference modifications") add or remove references[.](#1.sentence-1)

Table [58](#tab:meta.trans.ref) — Reference modifications [[tab:meta.trans.ref]](./tab:meta.trans.ref)  

| [ð](#tab:meta.trans.ref-row-1)<br>**Template** | **Comments** |
| --- | --- |
| [ð](#tab:meta.trans.ref-row-2)<br>template<class T>   struct remove_reference; | If T has type âreference to T1â then the  member typedef type denotes T1;  otherwise, type denotes T[.](#tab:meta.trans.ref-row-2-column-2-sentence-1) |
| [ð](#tab:meta.trans.ref-row-3)<br>template<class T>   struct add_lvalue_reference; | If T is a referenceable type ([[defns.referenceable]](defns.referenceable "3.45 referenceable type")) then  the member typedef type denotes T&;  otherwise, type denotes T[.](#tab:meta.trans.ref-row-3-column-2-sentence-1)<br>[*Note [1](#tab:meta.trans.ref-row-3-column-2-note-1)*:<br>This rule reflects the semantics of reference collapsing ([[dcl.ref]](dcl.ref "9.3.4.3 References"))[.](#tab:meta.trans.ref-row-3-column-2-sentence-2) â *end note*] |
| [ð](#tab:meta.trans.ref-row-4)<br>template<class T>   struct add_rvalue_reference; | If T is a referenceable type then  the member typedef type denotes T&&;  otherwise, type denotes T[.](#tab:meta.trans.ref-row-4-column-2-sentence-1)<br>[*Note [2](#tab:meta.trans.ref-row-4-column-2-note-2)*:<br>This rule reflects the semantics of reference collapsing ([[dcl.ref]](dcl.ref "9.3.4.3 References"))[.](#tab:meta.trans.ref-row-4-column-2-sentence-2)<br>For example, when a type T is a reference type T1&,  the type add_rvalue_reference_t<T> is not an rvalue reference[.](#tab:meta.trans.ref-row-4-column-2-sentence-3) â *end note*] |
