This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
[depr.volatile.type]
# Annex D (normative) Compatibility features [[depr]](./#depr)
## D.4 Deprecated volatile types [depr.volatile.type]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L60)
Postfix ++ and -- expressions ([[expr.post.incr]](expr.post.incr "7.6.1.6Increment and decrement")) and
prefix ++ and -- expressions ([[expr.pre.incr]](expr.pre.incr "7.6.2.3Increment and decrement"))
of volatile-qualified arithmetic and pointer types are deprecated[.](#1.sentence-1)
[*Example [1](#example-1)*: volatile int velociraptor;++velociraptor; // deprecated — *end example*]
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L73)
Certain assignments
where the left operand is a volatile-qualified non-class type
are deprecated; see [[expr.assign]](expr.assign "7.6.19Assignment and compound assignment operators")[.](#2.sentence-1)
[*Example [2](#example-2)*: int neck, tail;volatile int brachiosaur;
brachiosaur = neck; // OK tail = brachiosaur; // OK tail = brachiosaur = neck; // deprecated brachiosaur += neck; // OK — *end example*]
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L90)
A function type ([[dcl.fct]](dcl.fct "9.3.4.6Functions"))
with a parameter with volatile-qualified type or
with a volatile-qualified return type is deprecated[.](#3.sentence-1)
[*Example [3](#example-3)*: volatile struct amber jurassic(); // deprecatedvoid trex(volatile short left_arm, volatile short right_arm); // deprecatedvoid fly(volatile struct pterosaur* pteranodon); // OK — *end example*]
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/future.tex#L104)
A structured binding ([[dcl.struct.bind]](dcl.struct.bind "9.7Structured binding declarations")) of a volatile-qualified type
is deprecated[.](#4.sentence-1)
[*Example [4](#example-4)*: struct linhenykus { short forelimb; };void park(linhenykus alvarezsauroid) {volatile auto [what_is_this] = alvarezsauroid; // deprecated// ...} — *end example*]