LLVM: llvm::yaml::SequenceTraits< T, EnableIf > Struct Template Reference (original) (raw)
This class should be specialized by any type that needs to be converted to/from a YAML sequence. More...
#include "[llvm/Support/YAMLTraits.h](YAMLTraits%5F8h%5Fsource.html)"
template<typename T, typename EnableIf = void>
struct llvm::yaml::SequenceTraits< T, EnableIf >
This class should be specialized by any type that needs to be converted to/from a YAML sequence.
For example:
template<> struct SequenceTraits { static size_t size(IO &io, MyContainer &seq) { return seq.size(); } static MyType& element(IO &, MyContainer &seq, size_t index) { if ( index >= seq.size() ) seq.resize(index+1); return seq[index]; } };
Definition at line 245 of file YAMLTraits.h.
The documentation for this struct was generated from the following file:
- include/llvm/Support/YAMLTraits.h