[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.6 Increment and decrement")) and
prefix ++ and -- expressions ([[expr.pre.incr]](expr.pre.incr "7.6.2.3 Increment 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.19 Assignment 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.6 Functions"))
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.7 Structured 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*]
