[depr.volatile.type] (original) (raw)
Annex D (normative) Compatibility features [depr]
D.5 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
:
volatile int velociraptor; ++velociraptor;
— end example
]
Certain assignments where the left operand is a volatile-qualified non-class type are deprecated; see [expr.ass].
[ Example
:
int neck, tail;
volatile int brachiosaur;
brachiosaur = neck;
tail = brachiosaur;
tail = brachiosaur = neck;
brachiosaur += neck;
brachiosaur = 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
:
volatile struct amber jurassic();
void trex(volatile short left_arm, volatile short right_arm);
void fly(volatile struct pterosaur* pteranodon);
— end example
]
A structured binding ([dcl.struct.bind]) of a volatile-qualified type is deprecated.
[ Example
:
struct linhenykus { short forelimb; }; void park(linhenykus alvarezsauroid) { volatile auto [what_is_this] = alvarezsauroid;
}
— end example
]