On quinta-feira, 3 de outubro de 2013 23:03:44, Wander Lairson Costa wrote:
> If we combine two enum values, the result is not a valid enum value
> anymore, so it cannot be attributed to an enum variable.
> 
> C++ compilers will complain if such an assigment is done.

This is done all the time in C++. The enum must be backed by an integer with 
at least as many bits as the enum possesses. With the ABI that GCC uses, it's 
always at least 4 bytes.

The only thing is that you need to cast it from integer back to the enum type.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to