struct TaggedScalarTraits

Declaration

template <typename T>
struct TaggedScalarTraits { /* full declaration omitted */ };

Description

This class should be specialized by type that requires custom conversion to/from a YAML scalar with optional tags. For example: template < > struct TaggedScalarTraits <MyType > { static void output(const MyType &Value , void*, llvm::raw_ostream &ScalarOut , llvm::raw_ostream &TagOut ) { // stream out custom formatting including optional Tag Out < < Value; } static StringRef input(StringRef Scalar, StringRef Tag, void*, MyType &Value ) { // parse scalar and set `value` // return empty string on success, or error string return StringRef(); } static QuotingType mustQuote(const MyType &Value , StringRef) { return QuotingType::Single; } };

Declared at: llvm/include/llvm/Support/YAMLTraits.h:214

Templates

T