In my class I defined an enum like this:
class myClass { public: enum access { forL, forM, forA }; typedef access AccessType;
You can't do an implicit cast from int -> enum, since at compile time there is no way to know that the cast is valid.
You can do implicit casts the other way, so you could (if you wanted to) do:
int foo = forL;