[depr.volatile.type] (original) (raw)
Annex D (normative) Compatibility features [depr]
D.4 Deprecated volatile types [depr.volatile.type]
Postfix ++ and -- expressions ([expr.post.incr]) and prefix ++ and -- expressions ([expr.pre.incr]) of volatile-qualified arithmetic and pointer types are deprecated.
[Example 1: volatile int velociraptor;++velociraptor; — _end example_]
Certain assignments where the left operand is a volatile-qualified non-class type are deprecated; see [expr.assign].
[Example 2: int neck, tail;volatile int brachiosaur; brachiosaur = neck; tail = brachiosaur; tail = brachiosaur = neck; brachiosaur += neck; — _end example_]
A function type ([dcl.fct]) with a parameter with volatile-qualified type or with a volatile-qualified return type is deprecated.
[Example 3: volatile struct amber jurassic(); void trex(volatile short left_arm, volatile short right_arm); void fly(volatile struct pterosaur* pteranodon); — _end example_]
[Example 4: struct linhenykus { short forelimb; };void park(linhenykus alvarezsauroid) { volatile auto [what_is_this] = alvarezsauroid; } — _end example_]