From 60a4f4dfdac9b94ef3b642af808b3fb17955e783 Mon Sep 17 00:00:00 2001 From: Anton Bachin Date: Sat, 11 Jul 2015 13:15:59 -0500 Subject: [PATCH] Updated documentation. --- README.md | 11 +++++++---- doc/CONTRIBUTING.md | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 03a5b01..6cc9f15 100644 --- a/README.md +++ b/README.md @@ -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,8 +55,9 @@ 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 +[underlying]: http://aantron.github.io/better-enums/demo/NonIntegralUnderlyingTypes.html ## Limitations diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md index 67b82f8..b1c0915 100644 --- a/doc/CONTRIBUTING.md +++ b/doc/CONTRIBUTING.md @@ -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/`