volatile qualifier

   
volatile qualifier Volatile qualifier

  cv-qualifier  ::= const  volatile  cv-qualifier-seq  ::= const  volatile  const volatile  volatile const 

The volatile qualifier can be used with objects and member functions. The volatile qualifier tells the compiler to avoid certain optimizations because the object's value can change in unexpected ways. As a function qualifier, volatile tells the compiler to treat this as a volatile pointer in the member function body.

Example

  volatile  sig_atomic_t interrupted = false; 

See Also

const , const_cast , type , Chapter 2, Chapter 5

   


C++ in a Nutshell
C++ in a Nutshell
ISBN: 059600298X
EAN: 2147483647
Year: 2005
Pages: 270
Authors: Ray Lischner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net