Files
cppdraft_translate/cppdraft/any/general.md
2025-10-25 03:02:53 +03:00

27 lines
1.0 KiB
Markdown
Raw 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.

[any.general]
# 22 General utilities library [[utilities]](./#utilities)
## 22.7 Storage for any type [[any]](any#general)
### 22.7.1 General [any.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L7020)
Subclause [[any]](any "22.7Storage for any type") describes components that C++ programs may use to perform operations on objects of a discriminated type[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L7023)
[*Note [1](#note-1)*:
The discriminated type can contain values of different types but does not attempt conversion between them,
i.e., 5 is held strictly as an int and is not implicitly convertible either to "5" or to 5.0[.](#2.sentence-1)
This indifference to interpretation but awareness of type effectively allows safe, generic containers of single values, with no scope for surprises from ambiguous conversions[.](#2.sentence-2)
— *end note*]