1
0
Fork 0
mirror of https://github.com/Neargye/magic_enum.git synced 2026-01-09 23:34:23 +00:00
Commit graph

522 commits

Author SHA1 Message Date
neargye
e55b9b54d5 v0.9.5 2023-11-16 12:32:10 +04:00
neargye
677636ec43 clean-up 2023-11-15 23:07:55 +04:00
Arkhipov Ivan
56dcb011c2
Put get to magic_enum::containers namespace (#316) 2023-11-15 22:25:49 +04:00
Chris Sauer
016883d29a
Simplify Bazel (#312) 2023-11-15 14:17:08 +04:00
Chris Sauer
3437129f30
Bazel: Make include directories consistent (#311)
Addresses Bazel part of https://github.com/Neargye/magic_enum/issues/310
2023-11-14 21:07:33 +04:00
neargye
d52a0c1c18 [CI] remove continue-on-error 2023-11-14 17:59:15 +04:00
neargye
ea5b977b8d v0.9.4 2023-11-12 17:36:48 +04:00
Ryan Samarakoon
cd5fd2c343
Fix set erase function (#308) 2023-11-12 17:30:10 +04:00
neargye
3c92e9035b meson fix include_directories 2023-11-12 01:16:32 +04:00
neargye
eb867ec9ba put headers in include/magic_enum directory 2023-11-12 01:11:55 +04:00
Vitaly
5523803cfc
Explicitly mark the result of detail::names as constexpr (#305)
It might make no sense, but on MSVC it can generate a compile-time
error, especially if an enumerator's value is out of range.

Example:
error C3615: constexpr function 'magic_enum::detail::names' cannot
result in a constant expression
...
note: failure was caused by call of undefined function or one not
declared 'constexpr'
...
note: see usage of '__builtin_array_init_helper'
2023-11-09 14:09:37 +04:00
Ralph J. Steinhagen
5cf4eb3a53
fixes 'std::ptrdiff_t' to 'std::size_t' casting error and suppresses -Wuseless-cast warning for gcc and clang (#306)
* fixes 'std::ptrdiff_t' to 'std::size_t' casting error

addresses this compiler warning:

```text
[..]/magic_enum_utility.hpp:101:31: warning: conversion to ‘std::size_t’ {aka ‘long unsigned int’} from ‘std::ptrdiff_t’ {aka ‘long int’} may change the sign of the result [-Wsign-conversion]
  101 |       return enum_value<D, S>(index);
      |                               ^~~~~
```

* suppresses `-Wuseless-cast` for static_cast<char_type>('\0')

needed in case 'char_type' is 'char' (common on Linux but rare on Windows?)

```text
[..]/magic_enum.hpp:275:114: warning: useless cast to type ‘using magic_enum::char_type = using std::basic_string_view<char>::value_type = char’ {aka ‘char’} [-Wuseless-cast]
  275 |   constexpr static_str(string_view str, std::integer_sequence<std::uint16_t, I...>) noexcept : chars_{str[I]..., static_cast<char_type>('\0')} {}
      |                                                                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2023-11-09 14:07:16 +04:00
RaceTheMaSe
49bb72da8e
Remove superfluous semicolon (#304) 2023-10-19 01:53:37 +03:00
Ruben Anders
a7926c63d4
Fix link to Conan in README (#301) 2023-10-09 11:33:54 +04:00
neargye
d67973d118 fix Argument-dependent lookup results in enum_switch 2023-10-04 19:14:27 +04:00
neargye
dfcd851dba fix build 2023-10-04 19:13:20 +04:00
neargye
ed8bb5d63a check for -D__PRETTY_FUNCTION__=__FUNCTION__ 2023-10-04 19:04:09 +04:00
neargye
b291b0ce5a fix fmt::formatter 2023-09-20 18:44:31 +04:00
neargye
33e4bb8640 update doc 2023-09-15 14:30:21 +04:00
Ezekiel Warren
d705e50884
automatically create and upload bzlmod archive (#294) 2023-09-12 16:19:27 +04:00
Ezekiel Warren
8b185c82cf
default bazel copts condition (#295) 2023-09-12 16:19:13 +04:00
Ezekiel Warren
745bf36a64
bazel updates (#291) 2023-08-23 13:40:03 +04:00
neargye
40e12d6229 update readme 2023-08-14 18:53:15 +04:00
neargye
45c8b5d92c update doc 2023-08-14 18:41:40 +04:00
neargye
4904822db8 fix CLI/C++ 2023-06-28 20:05:12 +04:00
neargye
e1ea11a93d v0.9.3 2023-06-22 17:22:05 +04:00
neargye
4555faae9e clean-up containers 2023-06-22 17:05:17 +04:00
neargye
288cb71861 clean-up containers 2023-06-21 12:57:55 +04:00
neargye
43070070e6 fix enum_type_name in namespace 2023-06-21 12:45:59 +04:00
Valeri
4a862c932e
meson_options.txt: remove leftover noascii option (#282) 2023-06-21 12:23:06 +04:00
neargye
8107ceb0fa format containers throw 2023-06-19 12:28:18 +04:00
neargye
f01fcf0373 add assert in containers::[] 2023-06-19 12:00:54 +04:00
neargye
eb0f051078 add check in enum_flags_name 2023-06-19 01:25:00 +04:00
neargye
fd9f70b91d fix _ITERATOR_DEBUG_LEVEL 2023-06-16 06:04:33 +04:00
neargye
e43f7a9329 update readme 2023-06-16 00:30:02 +04:00
neargye
911cd2047b fix VS_2017_WORKAROUND for resharper 2023-06-14 03:02:45 +04:00
neargye
fd15349e17 fix warn 2023-06-12 17:49:35 +04:00
neargye
fe122a8366 move enum_for_each to magic_enum_utility.hpp 2023-06-12 17:46:11 +04:00
neargye
7a881a68ba add enum_next_value and enum_prev_value 2023-06-12 17:45:42 +04:00
neargye
cf963cba28 add MAGIC_ENUM_NO_EXCEPTION 2023-06-12 17:44:50 +04:00
neargye
64bc3dba6c add MAGIC_ENUM_ENABLE_HASH_SWITCH 2023-06-12 17:43:57 +04:00
neargye
e7749da06b add MAGIC_ENUM_NO_ASSERT 2023-06-12 17:43:19 +04:00
neargye
cf659c59c8 add <magic_enum_all.hpp> 2023-06-12 17:40:10 +04:00
neargye
5018ef9677 v0.9.2 2023-06-10 15:30:32 +04:00
Jordan Rupprecht
8a26b3dc42
Re-enable Wenum-constexpr-conversion clang fix (#279) 2023-06-06 13:22:49 +04:00
neargye
27f5b9d925 clean-up 2023-06-05 15:18:56 +04:00
neargye
6e1978eea7 fix warn 2023-06-05 15:16:20 +04:00
neargye
3b4967b21e move all enum_flags_* func to enum_flags.hpp 2023-06-05 14:44:06 +04:00
Daniil Goncharov
9508c563da
add enum_flags_test and enum_flags_test_any functions for flags (#277)
Co-authored-by: Jon Petrissans <jon.petrissans@protonmail.com>
2023-06-05 14:10:02 +04:00
neargye
0b2c1cf072 MAGIC_ENUM_VS_2017_WORKAROUND 2023-06-05 14:09:38 +04:00