A. Jiang
2ec43969d8
More reliable value validness detection towards CWG1766 ( #398 )
...
CWG1766 made out-of-range cast to enumeration without fixed underlying
type raise undefined behavior. Such UB arguably also applies to
`bit_cast`, although it's not required that UB in `bit_cast` makes the
expression non-constant.
Currently, only Clang has implemented CWG1766, while Clang's underlying
`__builtin_bit_cast` happens to be a workaround. However, it's more
reliable to me to rely on the guarantee that core language UB causes
constant evaluation failure.
The approach in this patch effectively detects whether
`std::integral_constant<E, static_cast<E>(V)>` is a valid type, which is
equivalent to whether `static_cast<E>(V)` is a constant expression. When
the answer is `false`, value `V` can't be an enumerator of `E`.
2025-02-20 12:34:09 +04:00
Jon Skjelsbæk
1a1824df7a
Using CMAKE_INSTALL_INCLUDEDIR for installing includes. ( #391 )
2024-11-23 18:07:10 +02:00
Emmanuel Ferdman
85e05c8e76
fix: magic_enum.hpp reference ( #390 )
2024-11-23 18:07:03 +02:00
neargye
06741ec03f
update doc
2024-11-20 00:07:21 +02:00
neargye
84990c60b2
update doc
2024-11-19 23:47:49 +02:00
Felix
715b442682
Only prepend $prefix for relative paths ( #389 )
2024-11-18 13:30:32 +02:00
neargye
e046b69a37
v0.9.7
2024-11-14 00:15:10 +01:00
Bastian Schmitz
15a085f234
fix enum_fuse shift value calculation (Neargye#386) ( #387 )
2024-11-14 00:04:44 +01:00
dependabot[bot]
c2636e59da
Bump the github-actions group with 4 updates ( #385 )
2024-11-14 00:04:28 +01:00
Stephan Lachnit
49a707dc77
meson: install headers and pkg-config file ( #383 )
2024-11-14 00:03:26 +01:00
Arni
a72a0536c7
fix installing via cmake ( #374 )
2024-10-14 18:05:55 +03:00
dependabot[bot]
9675f2bc29
Bump github/codeql-action in the github-actions group ( #380 )
2024-10-14 15:36:44 +03:00
neargye
126539e13c
fix doc
2024-09-22 19:59:40 +03:00
dependabot[bot]
a560110ead
Bump the github-actions group with 2 updates ( #375 )
2024-09-19 13:01:16 +03:00
dependabot[bot]
dae6bbf16c
Bump the github-actions group with 3 updates ( #370 )
2024-08-03 16:37:33 +03:00
Ricardo Cardoso
ec8b0e985f
Update comments regarding max and min ( #369 )
...
The comments in the code regarding MAGIC_ENUM_RANGE_MIN and MAGIC_ENUM_RANGE_MAX values were not updated according to the latest changes on those default values.
2024-07-25 11:29:56 +03:00
asolwa
9a9308fd54
fix bitset constructor ( #367 )
2024-07-19 15:51:58 +03:00
Atanov Mikhail
664ee62c12
Parameterize formatter::format to use with FMT_COMPILE ( #365 )
2024-07-08 20:37:57 +03:00
dependabot[bot]
ec1adc5763
Bump github/codeql-action in the github-actions group ( #364 )
2024-07-01 23:07:11 +03:00
neargye
dd6a39d0ba
v0.9.6
2024-06-29 17:17:06 +03:00
neargye
0c1d10a624
fix tests
2024-06-29 17:13:32 +03:00
neargye
f08355cd0d
fix enum_reflected
2024-06-29 17:01:20 +03:00
neargye
bc2e94853b
add enum_reflected
2024-06-29 16:47:56 +03:00
Daniil Goncharov
2ac8152a2b
update ci ( #363 )
2024-06-29 16:18:48 +03:00
neargye
f2ad79f06b
fix #362
2024-06-28 22:59:30 +03:00
Shahar Hadas
bf3c74ab7e
Add better support for Yocto/PetaLinux ( #360 )
...
Added a new option of MAGIC_ENUM_OPT_INSTALL_PACKAGE_XML to allow disabling the package.xml file
2024-06-09 23:06:15 +03:00
Ezekiel Warren
173f22250c
chore: remove crlf line endings in bazel files ( #358 )
2024-06-04 20:55:16 +03:00
dependabot[bot]
10e69c799a
Bump the github-actions group with 2 updates ( #356 )
2024-06-01 11:34:45 +03:00
LEE KYOUNGHEON
db0b726c05
Add MAGIC_ENUM_USE_STD_MODULE option to use standard library module. ( #350 )
2024-05-28 00:17:33 +03:00
Daniil Goncharov
801c68bdc9
fix wshadow ( #354 )
2024-05-25 17:35:16 +03:00
neargye
a2077c01c3
clean-up
2024-05-16 00:10:53 +03:00
dependabot[bot]
1a366d677e
Bump the github-actions group with 2 updates ( #346 )
2024-05-15 23:13:02 +03:00
LEE KYOUNGHEON
7afc57b194
Support C++20 module. ( #343 )
2024-05-09 00:02:49 +03:00
dependabot[bot]
f34f967c4e
Bump the github-actions group with 1 update ( #341 )
2024-04-02 18:37:02 +03:00
dependabot[bot]
d63a9d6371
Bump the github-actions group with 2 updates ( #339 )
2024-03-04 15:54:14 +02:00
neargye
a7f35612ab
update doc
2024-02-22 18:29:45 +04:00
neargye
ec11ae0c28
removed restrictions on maximum range size
2024-02-22 14:23:33 +04:00
neargye
d7c7675b56
update readme
2024-02-22 14:22:46 +04:00
Stephan Lachnit
66e5a46094
example_switch.cpp: properly return 0 ( #336 )
2024-02-10 16:13:25 +04:00
dependabot[bot]
b4ada55c8c
Bump the github-actions group with 2 updates ( #333 )
2024-02-01 16:11:43 +04:00
Walter
40ecd7dfb4
Tidy up Limitations page ( #332 )
2024-01-21 14:13:49 +04:00
dependabot[bot]
d3f466bf0c
Bump the github-actions group with 4 updates ( #331 )
2024-01-12 15:23:40 +04:00
neargye
414fb654d3
update copyright
2024-01-02 02:50:34 +04:00
neargye
81b9b054f6
update readme
2024-01-02 02:40:37 +04:00
neargye
aa465f7f37
update doc and example
2024-01-02 02:39:10 +04:00
neargye
6992f41db7
update readme
2024-01-02 02:39:01 +04:00
neargye
73c1d83646
fix build
2024-01-02 02:19:26 +04:00
neargye
9565965afd
clean-up
2024-01-02 02:04:57 +04:00
Diogo Teles Sant'Anna
c7a793d71a
CI: hash-pin sensitive workflow and configure dependabot to keep them updated ( #329 )
2024-01-02 02:00:05 +04:00
Chris Sauer
f41e4cdc92
Bazel: --incompatible_use_platforms_repo_for_constraints migrated ( #325 )
2023-12-20 10:40:10 +04:00