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

Use bitwise OR for magic_enum::enum_fuse (#131)

This commit is contained in:
Pavel I. Kryukov 2022-02-11 19:35:50 +03:00 committed by GitHub
parent e7b9231906
commit 5444f00a04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 24 deletions

View file

@ -333,7 +333,7 @@ template <typename... Es>
[[nodiscard]] constexpr std::size_t enum_fuse(Es... values);
```
* Returns a bijective mix of several enum values with [Cantor pairing function](https://en.wikipedia.org/wiki/Pairing_function). This can be used to emulate 2D switch/case statements.
* Returns a bijective mix of several enum values. This can be used to emulate 2D switch/case statements.
* Examples