neargye
e325a70663
fix macro check support
2019-11-18 13:35:45 +05:00
neargye
60948a4810
update ci
2019-11-18 13:35:32 +05:00
neargye
49d2429cf1
update doc and example
2019-10-26 22:09:23 +05:00
Alexander Karatarakis
f951f3f04e
Fix typo in version ( #20 )
2019-10-24 13:30:10 +03:00
neargye
10d09b1c99
add cstdint because used std::int*_t
2019-10-18 19:21:47 +05:00
neargye
64856beffb
v0.6.3
2019-10-18 13:33:06 +05:00
neargye
5a33daa766
update enum_traits
2019-10-17 13:18:37 +05:00
neargye
497a0c0b69
update gitignore
2019-10-17 13:08:44 +05:00
neargye
69709876c3
update ci
2019-10-16 14:12:54 +05:00
neargye
a6d25eb4c8
update catch to fix clang-9 build
2019-10-16 14:11:25 +05:00
neargye
d022583a1a
clean-up cast, size check
2019-10-16 14:11:15 +05:00
neargye
00f46ae79c
fix test
2019-10-14 21:10:50 +05:00
neargye
a36721d6c7
clang 5 linker fail: undefined reference to `magic_enum::enum_range<number>::min/max'
2019-10-14 19:45:03 +05:00
neargye
3804a9d3b2
update test
2019-10-14 17:55:45 +05:00
neargye
851e7f1a4e
clean-up test
2019-10-14 17:47:36 +05:00
neargye
6c9c498faa
clean-up mixed_sign_less
2019-10-14 17:29:35 +05:00
neargye
1c04e115de
update readme
2019-10-14 15:16:58 +05:00
neargye
5873f123f3
clean-up
2019-10-14 13:54:17 +05:00
neargye
4066fa35e5
get values on all reflected_range to avoid additional work
2019-10-14 13:10:15 +05:00
neargye
6b95773b05
clean-up tests
2019-10-14 13:03:28 +05:00
Alexander Karatarakis
db4c55c36a
Change the way range_min()/max() is calculated ( #19 )
...
This was previously done via parameter expansion. The expanded form
looks like this:
A(128) && A(127) && ... && A(X) && ... && A(0)
where A(X) is the actual range_max which is crafted to return 'false'.
Static analysis detects that expressions after A(X) are
dead code due to short-circuiting.
The new implementation uses a simple loop to find the extrema,
similarly to the loop in detail::values().
Furthermore, it uses only one parameter expansion (for reflected_set_v),
as opposed to two (one for range_min and one for range_max).
2019-10-14 10:44:42 +03:00
Alexander Karatarakis
0f36cd5b0f
Introduce mixed_sign_less()/min()/max() ( #18 )
...
Previously, there was mixed sign comparison:
```
reflected_min_v = -120 > 0U ? -120 : 0
```
which returns -120 because the condition is true, since the
compiler casts the signed value to unsigned, leading to a huge value.
This caused the following values as result:
```
reflected_min_v == -120
min_v = -1
static_cast<U>(min_v) = 18446744073709551615
```
The last one is used in magic_enum::enum_index().
2019-10-14 10:44:09 +03:00
neargye
1f3ea64407
v0.6.2
2019-10-08 13:20:14 +05:00
neargye
00bd8528ce
update doc
...
fix MAGIC_ENUM_NO_CHECK_SUPPORT
2019-10-04 13:58:08 +05:00
neargye
2a259f1b55
update doc
2019-10-03 19:43:18 +05:00
neargye
cd73e2b974
add doc
2019-10-03 19:40:42 +05:00
neargye
1f61e72c26
fix type cast
2019-10-03 17:33:18 +05:00
neargye
77314d254d
clean-up
2019-10-03 17:08:11 +05:00
neargye
0b262f7cc8
fix cvref
2019-10-03 14:50:09 +05:00
Alexander Karatarakis
3f0aad9f74
Fix regression of enum_cast<>() when used with refs (EnumT& vs EnumT) ( #16 )
2019-10-03 12:02:39 +05:00
neargye
cbbb6dd8f1
add comment to MAGIC_ENUM_SUPPORTED
2019-10-02 17:52:04 +05:00
neargye
105c8f067e
remove is_fixed_enum
...
non stable and useless
2019-10-02 17:06:36 +05:00
neargye
c947afdbae
change check support compiler
2019-10-02 15:28:53 +05:00
neargye
75c9d9bce5
caching entries
2019-10-01 16:58:55 +05:00
neargye
2c0b00a7ed
add error if count < 0, fix #15
2019-10-01 16:58:35 +05:00
neargye
92dfab4ac4
improve enum_value for dense enums
2019-09-30 19:08:29 +05:00
neargye
77918a74c5
fix build on gcc<9
2019-09-30 17:17:50 +05:00
neargye
2f9400bcf3
wow, msvc not follow standard
2019-09-29 17:50:05 +05:00
neargye
52f36fc5a0
removed definition that used only once
2019-09-29 17:47:54 +05:00
neargye
8eb87a9a88
v0.6.1
2019-09-29 16:31:58 +05:00
neargye
26dcd30d9a
update ci
2019-09-29 16:30:47 +05:00
neargye
289b96e561
update example
2019-09-29 16:22:58 +05:00
neargye
2541180874
update test
2019-09-29 16:22:47 +05:00
neargye
48ff12026f
update readme
2019-09-29 16:22:25 +05:00
neargye
370a1d5236
improvement
...
* SFINAE-friendly
* overhead reduction
* add enum_index
* add enum_traits
* less bin size
2019-09-29 16:22:09 +05:00
neargye
455e4dcf9b
strengthened noexcept
2019-09-09 19:38:30 +05:00
neargye
3edfd58e59
clean-up naming
2019-09-03 17:53:26 +05:00
neargye
2eac4ccd06
update readme
2019-08-30 02:35:59 +05:00
neargye
1f94f282c0
fix conan.py
2019-08-30 02:35:47 +05:00
neargye
c0ae150a26
add macro to no check support
2019-08-29 18:52:20 +05:00