142 Commits

Author SHA1 Message Date
Anton Bachin
520d8ee390 Update copyright year 2024-01-07 15:20:03 +03:00
Chris Heyes
d65550f378
Turn off clang-format (#118)
Turns off clang-format for easier usage in projects using it.
2024-01-07 15:18:17 +03:00
Anton Bachin
1e8f499ddf Update copyright year 2021-09-09 14:18:02 +03:00
Anton Bachin
f3ff0a6917 Remove version link from README
[skip ci]
2020-11-08 08:37:41 +03:00
Anton Bachin
68ca02d1f5 Replace tab by spaces
[skip ci]
2020-11-08 08:28:09 +03:00
Anton Bachin
517387fba0 Docs: rely on GitHub issues only for contact
[skip ci]
2020-10-19 09:11:14 +03:00
Anton Bachin
fb8b398b02 README: remove link to magic_enum
There are now several alternative enum libraries, so the README no
longer seems to be a convenient place for linking them. At this point,
they should be quite discoverable on their own.

See https://github.com/aantron/better-enums/issues/89#issuecomment-706870187.
Closes #78.

[skip ci]
2020-10-19 09:05:45 +03:00
Anton Bachin
c35576bed0 Docs: update version number
[skip ci]
0.11.3
2020-10-19 08:45:29 +03:00
Anton Bachin
2422dd6f26 Docs: remove Wandbox link
[skip ci]
2020-10-19 08:45:17 +03:00
Anton Bachin
894eab5284 Fix some code formatting
[skip ci]
2020-10-19 08:42:50 +03:00
Anton Bachin
fd646ae537 Document BETTER_ENUMS_CLASS_ATTRIBUTE
Follow-on to #80.

[skip ci]
2020-10-19 08:33:38 +03:00
Anton Bachin
abb693d4ef Document BETTER_ENUMS_DECLARE_STD_HASH
Follow-on to #77.

[skip ci]
2020-10-19 08:26:14 +03:00
Anton Bachin
2f1fcaae7a Docs: fix rendering of <Enum>
[skip ci]
2020-10-19 08:12:51 +03:00
Anton Bachin
3e115c0c17 Rename argument of _to_index, _from_index
Follow-on to #59.
2020-10-19 08:09:55 +03:00
Anton Bachin
c730fc8ae8 Document _to_index, _from_index, etc.
Follow-on to #59.

[skip ci]
2020-10-19 08:07:45 +03:00
Anton Bachin
f480b7ef1c Remove Patreon link
[skip ci]
2020-10-18 22:32:01 +03:00
Anton Bachin
1a3c4f9e5a Tweak note about magic_enum
Resolves #88.

[skip ci]
2020-10-08 21:50:05 +03:00
Anton Bachin
21c374914c Try GitHub Sponsors
[skip ci]
2020-01-23 01:53:00 +03:00
Jan-Gerd Tenberge
dcbd3c0554 Add BETTER_ENUMS_IGNORE_ATTRIBUTES_* for clang (#81) 2020-01-13 15:40:59 +03:00
Anton Bachin
89bc057a63 Update copyright year
[skip ci]
2020-01-01 18:16:19 +03:00
CJ Smith
5dcd59bd29 Ignores -Wattributes for GCC 7 and 8 to mask compiler bug. (#79)
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
This bug produces massive amounts of spurious warnings and is present
in the version of g++ currently available in RHEL devtoolset-7 and devtoolset-8.
2019-12-07 08:15:47 +03:00
Michael Ernst
fa39f5c89e Add macro BETTER_ENUMS_CLASS_ATTRIBUTE for adding attributes to enum class (#80)
When not set it defaults to empty macro.
2019-12-06 23:23:25 +03:00
Anton Bachin
4b76e7783b Recommend magic_enum
[skip ci]
2019-08-17 23:06:40 +03:00
Anton Bachin
1ea7f04bb9 Move LICENSE so that GitHub recognizes it
[skip ci]
2019-07-25 20:16:35 +03:00
Anton Bachin
e1756cdb07 Docs: remove unnecessary scroll bars
[skip ci]
2019-07-25 20:14:08 +03:00
Sven Scharmentke
5a677ac72b Support using better-enum as key in dictionaries and maps (#77)
This enabled hashing so that unordered_map are supported.
2019-07-16 12:36:16 +03:00
Felipe Lema
8a0d376b53 fix -wold-style-cast (#74) 2019-06-19 12:47:57 -05:00
Anton Bachin
8b4d8a9499 Bump version to 0.11.2
[skip ci]
0.11.2
2019-04-02 10:01:36 -05:00
Anton Bachin
ebc0c0138e Fix some long lines 2019-04-02 09:49:47 -05:00
Anton Bachin
b838852ff4 Remove stray comment
[skip ci]
2019-04-02 09:47:53 -05:00
Anton Bachin
f626bcde1a Docs: note maps are also specialized for wchar_t
Follow-on to #44.

[skip ci]
2019-04-02 09:29:02 -05:00
Xeverous
509c544d0f removed tabs in unwanted places (#72)
2 lines had tabs in the middle of the code, between spaces. This can
cause warnings in some tools and red markings in Git when commiting
code (tabs are to be used only as the starting characters, never after
any character).

After this commit, there are no tabs in the file at all.
2019-04-02 09:28:40 -05:00
D4koon
ed21395b20 Fix for Visual Studio 2017 (#70) 2018-11-28 03:28:05 -06:00
Anton Bachin
2d2a6a5648 AppVeyor: test on Visual Studio 2017
This commit also drops testing on Visual Studio 2008-2012, as they seem
not to be supported by the AppVeyor image.
2018-11-28 02:30:59 -06:00
Anton Bachin
882dd9cd1b Travis: allow Clang 3.3 build to fail
There seems to be some upstream bit rot with Clang++ 3.3. This is a
pretty old version, and we may want to just stop testing on it. However,
in the meantime, it will be allowed to fail without failing the overall
build.

Resolves #63.

[skip appveyor]
2018-10-19 12:37:03 -05:00
Wojciech Bartnik
94f8f95a26 Added syntax highlight (#67) 2018-10-19 12:32:40 -05:00
Felix Dombek
df5df3924e Changed identifiers beginning with underscore followed by uppercase letters. (#62)
These are in violation of the C++ standard. Renamed by lowercasing the
offending letters.

Affected identifiers:

- _Iterable -> _iterable
- _PutNamesInThisScopeAlso -> _putNamesInThisScopeAlso
_ _enumClassForSwitchStatements -> _enumClassForSwitchStatements
2018-09-19 13:31:42 -05:00
Piotr Kosek
97d38d8077 Added indexable properties on enums (#59)
- _to_index which return value 0... size-1
        (even if enums are note sequential)
 - _from_index used for other way around
 - _from_index_nothrow no throw version
 - _from_index_unchecked returns invalid enum
        in case arg>=size

Code and test cases added.
No documentation updates (my English is too poor for that)
2018-09-06 17:39:31 -05:00
Anton Bachin
e5549fb18c Docs: add notes about enabling C4062 on msvc
Resolves #49.

[skip ci]
2018-08-07 16:00:36 -05:00
Anton Bachin
21417b76b9 Doc generator: remove stale tweet image references
[skip ci]
2018-08-07 15:56:33 -05:00
Anton Bachin
3558c94cc7 README: add some whitespace
[skip ci]
2018-08-07 15:37:26 -05:00
Zsolt Parragi
2fad3f60ee Enabled constexpr support for Visual Studio 2017 2017-09-14 22:42:11 -05:00
Anton Bachin
ecdc88f066 Fix Travis build
It seems that the g++4.5 package has been obsoleted:

  https://travis-ci.org/aantron/better-enums/jobs/271125909#L492

There also seems to be some kind of upstream problem with clang++3.5
when building in C++14 mode:

  https://travis-ci.org/aantron/better-enums/jobs/271125912#L1349

To unblock development, this commit removes the g++4.5 build, and allows
the clang++3.5 build to fail for now.

[skip appveyor]
2017-09-14 13:35:28 -05:00
cheny
73a1619cb7 Specialize map_compare for wchar_t (#44)
Add the template partial specialization:
    struct map_compare<const wchar_t*> {...}
2017-07-13 06:20:57 -05:00
Anuradha Dissanayake
6988e0509e Fix /W4 level warnings in MSVC++ 2015 (#41)
Remove unused variable names and use underlying class for enum (VS 2012
and above support strongly typed enums and will warn about incorrect
usage).
2017-07-02 10:30:01 -05:00
cheparukhin
37d8f987ca Add unused attribute to free functions (#27) 2016-07-19 00:18:33 +01:00
Zsolt Parragi
ab4c8583db Enabled constepxr support for clang-cl. 2016-07-09 14:50:19 +02:00
cheparukhin
f520b397e3 Merge pull request #22 from cheparukhin/master
Fix name resolution errors
2016-07-08 19:50:32 +01:00
cheparukhin
c71b891c87 Add test for ostream operator 2016-07-08 19:50:04 +01:00
cheparukhin
d94b21a7e0 Resolve clashing global and nested namespace names
Using better_enums as a nested namespace name along a global better_enums namespace resulted in name clashes.
2016-06-22 15:52:35 +01:00