misc: Add the magic_enum.hh external header (v0.9.2)

Also increase maximum enum supported value to 0x100

This library is courtesy of Daniil Goncharov and hosted at
https://github.com/Neargye/magic_enum/tree/master. It enables
compile-time and runtime string to/from enum value conversion as well
as other fancy enum introspection-like things.

The MIT lincence should not conflict with gem5 in any way.

Copying the file for now but a submodule might be more suitable if
gem5 uses them in the future.

Change-Id: Ib0c8f943b79c703f1247c11c7291fb4fb1548b0f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/67665
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Gabriel Busnot
2023-02-02 18:11:39 +00:00
committed by Gabriel B.
parent b8af5f6a6c
commit 223a2ce234
2 changed files with 1499 additions and 0 deletions

1462
ext/magic_enum/magic_enum.hh Normal file

File diff suppressed because it is too large Load Diff