LLVM: llvm::yaml::ScalarEnumerationTraits< T, Enable > Struct Template Reference (original) (raw)
This class should be specialized by any integral type that converts to/from a YAML scalar where there is a one-to-one mapping between in-memory values and a string in YAML. More...
template<typename T, typename Enable = void>
struct llvm::yaml::ScalarEnumerationTraits< T, Enable >
This class should be specialized by any integral type that converts to/from a YAML scalar where there is a one-to-one mapping between in-memory values and a string in YAML.
For example:
struct ScalarEnumerationTraits { static void enumeration(IO &io, Colors &value) { io.enumCase(value, "red", cRed); io.enumCase(value, "blue", cBlue); io.enumCase(value, "green", cGreen); } };
Definition at line 107 of file YAMLTraits.h.