LLVM API Documentation

llvm::yaml::SequenceTraits< T > Struct Template Reference

#include <YAMLTraits.h>


Detailed Description

template<typename T>
struct llvm::yaml::SequenceTraits< T >

This class should be specialized by any type that needs to be converted to/from a YAML sequence. For example:

template<> struct SequenceTraits< std::vector<MyType> > { static size_t size(IO &io, std::vector<MyType> &seq) { return seq.size(); } static MyType& element(IO &, std::vector<MyType> &seq, size_t index) { if ( index >= seq.size() ) seq.resize(index+1); return seq[index]; } };

Definition at line 135 of file YAMLTraits.h.


The documentation for this struct was generated from the following file: