[depr.variant] # Annex D (normative) Compatibility features [[depr]](./#depr) ## D.16 Variant [depr.variant] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L592) The header [](variant.syn#header:%3cvariant%3e "22.6.2 Header synopsis [variant.syn]") has the following additions:namespace std {template struct variant_size; template struct variant_size; template struct variant_alternative; template struct variant_alternative;} [🔗](#itemdecl:1) `template struct variant_size; template struct variant_size; ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L610) Let VS denote variant_size of the cv-unqualified type T[.](#2.sentence-1) Then specializations of each of the two templates meet the [*Cpp17UnaryTypeTrait*](meta.rqmts#:Cpp17UnaryTypeTrait "21.3.2 Requirements [meta.rqmts]") requirements with a base characteristic of integral_constant[.](#2.sentence-2) [🔗](#itemdecl:2) `template struct variant_alternative; template struct variant_alternative; ` [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L624) Let VA denote variant_alternative of the cv-unqualified type T[.](#3.sentence-1) Then specializations of each of the two templates meet the [*Cpp17TransformationTrait*](meta.rqmts#:Cpp17TransformationTrait "21.3.2 Requirements [meta.rqmts]") requirements with a member typedef type that names the following type: - [(3.1)](#3.1) for the first specialization, add_volatile_t, and - [(3.2)](#3.2) for the second specialization, add_cv_t[.](#3.sentence-2)