Annex D (normative) Compatibility features [depr]

D.15 Variant [depr.variant]

The header <variant> ([variant.syn]) has the following additions:
namespace std {
  template<class T> struct variant_size<volatile T>;
  template<class T> struct variant_size<const volatile T>;

  template<size_t I, class T> struct variant_alternative<I, volatile T>;
  template<size_t I, class T> struct variant_alternative<I, const volatile T>;
}
template<class T> class variant_size<volatile T>; template<class T> class variant_size<const volatile T>;
Let VS denote variant_­size<T> of the cv-unqualified type T.
Then specializations of each of the two templates meet the Cpp17UnaryTypeTrait requirements with a base characteristic of integral_­constant<size_­t, VS​::​value>.
template<size_t I, class T> class variant_alternative<I, volatile T>; template<size_t I, class T> class variant_alternative<I, const volatile T>;
Let VA denote variant_­alternative<I, T> of the cv-unqualified type T.
Then specializations of each of the two templates meet the Cpp17TransformationTrait requirements with a member typedef type that names the following type:
  • for the first specialization, add_­volatile_­t<VA​::​type>, and
  • for the second specialization, add_­cv_­t<VA​::​type>.