On Sunday, 16 September 2018 at 23:59:18 UTC, aliak wrote:
What about:enum E: bool { no, yes } void main() { E e = cast(E)(0); } Would be illegal I assume?
You have an explicit cast, so no, it would be fine.
Nicholas Wilson via Digitalmars-d Sun, 16 Sep 2018 17:31:57 -0700
On Sunday, 16 September 2018 at 23:59:18 UTC, aliak wrote:
What about:enum E: bool { no, yes } void main() { E e = cast(E)(0); } Would be illegal I assume?
You have an explicit cast, so no, it would be fine.