5 Commits

Author SHA1 Message Date
Anton Bachin
6c60edcc46 Subscript operator for iterables and tests for constexpr iterators. 2015-05-17 22:13:44 -05:00
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
1465901bc1 Removed most weak symbols. Iterators should now be random access.
The remaining weak symbol will be removed when string conversions become
constexpr. Iterator are random access because they are now pointers.
2015-05-17 18:47:51 -05:00
Anton Bachin
460bb806a3 Eliminated separate map macro file and inlined its contents into enum.h. 2015-05-17 18:44:39 -05:00
Anton Bachin
dd606fd450 Initial release. 2015-05-11 17:38:41 -04:00