Anton Bachin

Results 662 comments of Anton Bachin

I think it's ultimately a matter of preference. I think something close to what you are proposing is also discussed in [Should Better Enums provide enum "objects" or traits types?](http://aantron.github.io/better-enums/DesignDecisionsFAQ.html#ShouldBetterEnumsProvideEnum)...

The strongest justification (not that strong) is that the wider project that spawned Better Enums needed both kinds of string conversion. Beyond that reason, it's only that it might be...

Well, it's a different kind of danger. The result of conversion will be correct for the ambiguous `from_integer` conversion, but potentially incorrect for the ambiguous `from_string_nocase` conversion. Round-trips can be...

It looks like `enum.h` would have to be modified to support a definable macro, which is expanded either [after the `class` keyword](https://github.com/aantron/better-enums/blob/37d8f987ca939af846a2d29a8f8198f9bf3ac4b7/enum.h#L588) or before each of the members you would...

Fork this repo, make your changes, push them to the fork, then click the "open pull request" button next to your branch. You may want to see this [help page](https://help.github.com/articles/about-pull-requests/).

Hi, thanks for looking at it. Perhaps you already have done this, but you should first run the repo's tests by cloning it, and running `make -C test` in the...

Agreed in principle, though, since it's a one-header library, it might be better to rename the file to `better_enums.h`, or something.

Yes, you have to follow [these instructions](http://aantron.github.io/better-enums/OptInFeatures.html#StrictConversions) and use `+` in your cases: ``` cpp switch (bar) { case +Foo::A: break; case +Foo::B: break; case +Foo::C: break; } ``` >...

Re: @rcdailey's suggestion of enumerators from #23: I considered enumerators, but IIRC the preprocessor+template hack I use to get mixed initialization syntax (`{A, B, C = 4, D}`) working doesn't...