Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

template<class C>
C& unconst ( const C &  that  )  [inline]

Shortcut to |const_cast<C &>()| that automatically derives the correct type (class) for the const_cast template's argument from its own argument. Can be used to temporarily cancel the |const| modifier on the left-hand side of assignment expressions, like this:

      const Class that;
      unconst (that) = some_value;

Definition at line 37 of file cpputils.h.

Referenced by USBController::init(), SnapshotMachine::init(), SessionMachine::init(), USBController::initCopy(), USBController::uninit(), SnapshotMachine::uninit(), SessionMachine::uninit(), and Console::uninit().

{ return const_cast <C &> (that); }

Generated by  Doxygen 1.6.0   Back to index