merge

Merge two types by their members.

If it has similar named members, then it uses the second one.

returns a named Tuple (or Aes) with all the members and their values.

template merge(T, U)
merge
(,)

Members

Functions

merge
auto merge(T base, U other)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

struct Point { double x; double y; string label = "Point"; }
auto pnt = Point( 1.0, 2.0 );

auto merged = DefaultValues.merge( pnt );
assertEqual( merged.x, 1.0 );
assertEqual( merged.y, 2.0 );
assertEqual( merged.colour, "black" );
assertEqual( merged.label, "Point" );

Meta