Prohibit enum <-> int mixup

Enrico Weigelt weigelt@metux.de
Sun Jan 30 20:21:00 GMT 2011


* Jonathan Wakely <jwakely.gcc@gmail.com> wrote:

> Technically what is allowed is implicit conversion from enum to int.
> In C++0x you can define a scoped enum which doesn't allow the
> conversion.

How exactly is this done ?


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------



More information about the Gcc-help mailing list