LLVM_YAML_STRONG_TYPEDEF

Define a distinct strong typedef _type over integral base _base.

Synopsis

Declared in <llvm/Support/YAMLTraits.h>

#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)

Description

YAML I/O does conversion based on types. But often native data types are just a typedef of built in intergral types (e.g. int). But the C++ type matching system sees through the typedef and all the typedefed types look like a built in type. This will cause the generic YAML I/O conversion to be used. To provide better control over the YAML conversion, you can use this macro instead of typedef. It will create a class with one field and automatic conversion operators to and from the base type. Based on BOOST_STRONG_TYPEDEF

Parameters

NameDescription
_baseUnderlying integral type.
_typeName of the strong typedef to define.