Files
2025-10-25 03:02:53 +03:00

26 lines
848 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[variant.general]
# 22 General utilities library [[utilities]](./#utilities)
## 22.6 Variants [[variant]](variant#general)
### 22.6.1 General [variant.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L5532)
A variant object holds and manages the lifetime of a value[.](#1.sentence-1)
If the variant holds a value, that value's type has to be one
of the template argument types given to variant[.](#1.sentence-2)
These template arguments are called alternatives[.](#1.sentence-3)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L5538)
In [[variant]](variant "22.6Variants"),*GET* denotes
a set of exposition-only function templates ([[variant.get]](variant.get "22.6.5Value access"))[.](#2.sentence-1)