On 12/29/2013 10:58 AM, Jonathan wrote:
> Given a struct
>
> struct Foo{
>enum INT_C {Yes, No}
>INT_C a;
> }
[...]
> The second choice is: do we qualify by the struct name:
>
> this(int y)
> {
>//option 1
>a = Foo.INT_C.Yes;
That's what I do without thinking much about it.
>
On Sunday, 29 December 2013 at 18:58:07 UTC, Jonathan wrote:
Given a struct
struct Foo{
enum INT_C {Yes, No}
INT_C a;
}
-- we wish to make a constructor. We want to set the answer to
Yes if we construct the struct with an integer. There are some
stylistic choices to be made.
The first
Given a struct
struct Foo{
enum INT_C {Yes, No}
INT_C a;
}
-- we wish to make a constructor. We want to set the answer to
Yes if we construct the struct with an integer. There are some
stylistic choices to be made.
The first choice is: do we use this (I seem to recall being told
in Ja