| 799 | */ |
| 800 | template<class T> |
| 801 | const char* enum_item_raw_key(T val) { |
| 802 | using traits = df::enum_traits<T>; |
| 803 | if constexpr (complex_enum<T>) |
| 804 | { |
| 805 | const auto& value_index_map = traits::complex.value_index_map; |
| 806 | auto it = value_index_map.find(val); |
| 807 | if (it != value_index_map.end()) |
| 808 | return traits::key_table[it->second]; |
| 809 | else |
| 810 | return nullptr; |
| 811 | } |
| 812 | else |
| 813 | { |
| 814 | return traits::is_valid(val) ? traits::key_table[(short)val - traits::first_item_value] : nullptr; |
| 815 | } |
| 816 | } |
| 817 | |
| 818 | |
| 819 | /** |
no test coverage detected