Location:
e32def.h
Link against:
MUTABLE_CAST(type,exp) (const_cast<type>(exp))
MUTABLE_CAST(type,exp) ((type)(exp))
MUTABLE_CAST(type,exp) (exp)
Supported from 5.0
Mutable cast — deprecated. See
__MUTABLE
.
This macro, together with the related macro, __MUTABLE
,
allows code to be written that can easily be recompiled to use the
mutable
keyword, at such a time when all compilers support this
keyword. Currently, the macro expands to a suitable cast, that simulates the
functionality that mutable
makes available.
If __VC32__
is defined (i.e. Microsoft Visual C++ is the
compiler), then the macro is defined as follows:
#if defined(__NO_MUTABLE_KEYWORD)#define MUTABLE_CAST(type,exp) (const_cast<type>(exp))#else#define MUTABLE_CAST(type,exp) (exp)
For GCC,
#if defined(__NO_MUTABLE_KEYWORD)#define MUTABLE_CAST(type,exp) ((type)(exp))#else#define MUTABLE_CAST(type,exp) (exp)#endif
As __NO_MUTABLE_KEYWORD
is defined in e32def.h,
the macro expands to a cast.
|