2 Commits

Author SHA1 Message Date
Anton Bachin
14bc834f7d Made to_string conversion constexpr and removed the last of the weak symbols.
The interface is now uniformly constexpr, including to_string and the _names
iterable. Without the weak symbol, the remaining code is also entirely standard
C++.

The compile-time string trimming code in this commit has a negative impact on
performance. The performance test is now twice as slow as including <iostream>,
whereas before it was faster. That test declares an excessive number of enums,
though, so perhaps in typical usage, and with some future optimizations, the
impact will not be so significant.

There may be other ways to solve this, such as providing a version of the macro
that does not trim strings at compile time, but only checks if they need
trimming. If some string does need trimming, that macro would fail a
static_assert and ask the user to use the slow macro.
2015-05-17 21:29:26 -05:00
Anton Bachin
dd606fd450 Initial release. 2015-05-11 17:38:41 -04:00