Updated documentation.

This commit is contained in:
Anton Bachin 2015-07-11 13:15:59 -05:00
parent f404ea709b
commit 60a4f4dfda
2 changed files with 27 additions and 4 deletions

View File

@ -7,7 +7,8 @@ file.
[sample]: https://raw.githubusercontent.com/aantron/better-enums/0.10.1/doc/image/sample.gif
[![Try online][wandbox-img]][wandbox] [![0.10.1][version]][releases]
[![Try online][wandbox-img]][wandbox] [![version 0.10.1][version]][releases]
[![BSD license][license-img]][license]
In C++11, *everything* can be used at compile time. You can convert your enums,
loop over them, [find their max][max],
@ -24,13 +25,14 @@ See the [project page][project] for full documentation.
[max]: http://aantron.github.io/better-enums/demo/BitSets.html
[enforce]: http://aantron.github.io/better-enums/demo/SpecialValues.html
[project]: http://aantron.github.io/better-enums
[wandbox]: http://melpon.org/wandbox/permlink/pdlAAGoxnjqG6FRI
[wandbox]: http://melpon.org/wandbox/permlink/5N9QZYdA5LqWy26R
[tutorial]: http://aantron.github.io/better-enums#Tutorial
[api]: http://aantron.github.io/better-enums/ApiReference.html
[releases]: https://github.com/aantron/better-enums/releases
[wandbox-img]: https://img.shields.io/badge/try%20it-online-blue.svg
[version]: https://img.shields.io/badge/version-0.10.1-lightgrey.svg
[license-img]: https://img.shields.io/badge/license-BSD-lightgrey.svg
## Installation
@ -43,7 +45,7 @@ enums that are missing from standard C++.
- No dependencies and no external build tools. Uses only standard C++, though,
for C++98, variadic macro support is required.
- Supported and tested on clang, gcc, and msvc.
- Supported and tested on [clang, gcc, and msvc][testing].
- Fast compilation. You have to declare a few dozen enums to slow down your
compiler as much as [just including `iostream` does][performance].
- Use any initializers and sparse ranges, just like with a built-in enum.
@ -53,6 +55,7 @@ enums that are missing from standard C++.
minimal freestanding environments.
- The underlying type [does not have to be an integral type][underlying].
[testing]: http://aantron.github.io/better-enums/CompilerSupport.html
[performance]: http://aantron.github.io/better-enums/Performance.html
[underlying]: http://aantron.github.io/better-enums/demo/NonIntegralUnderlyingTypes.html

View File

@ -4,6 +4,26 @@ All contributions are welcome: feedback, documentation changes, and, of course,
pull requests and patch suggestions. A list of contributors is maintained in the
`CONTRIBUTORS` file. I am grateful to everyone mentioned.
## Some major outstanding issues
- Better Enums currently uses linear scans for lookup, so it could really
benefit from a lookup data structure that is really fast to generate at
compile time. All the sorts and other approaches I have tried so far,
including MPL, Meta, and my own, have been 10-50 times too slow for practical
use.
- Alternatively, if there is a method to detect whether a given function is
running at compile or run time, Better Enums could use linear scans during
compilation, then do a sort at program initialization, and then use fast
lookups.
- It would be nice if name trimming was always `constexpr`. Right now, this is
not the default, because it makes compilation of each Better Enum about four
times slower. Better Enums needs a fast way to take a `const char*`, chop off
any initializers, and return the new `const char*`.
- I would like to enable more warning flags besides just
`-Wall -Wextra -pedantic`, but CxxTest triggers the extra warnings.
`CMakeLists.txt` should probably be modified to add the extra warnings to all
targets that are not CxxTest tests.
## Testing
I typically write small programs to play around with `enum.h`. The `scratch/`