Struct std.sumtype.SumType
A [tagged union](https://en.wikipedia.org/wiki/Tagged_union) that can hold a single value from any of a specified set of types.
						
				struct SumType(Types...)
				
				  
				
				if (is(NoDuplicates!Types == Types) && (Types
				The value in a SumType can be operated on using [pattern matching][match].
To avoid ambiguity, duplicate types are not allowed (but see the ["basic usage" example](#basic-usage) for a workaround).
 The special type This can be used as a placeholder to create
 self-referential types, just like with Algebraic. See the
 ["Arithmetic expression evaluator" example](#arithmetic-expression-evaluator) for
 usage.
 A SumType is initialized by default to hold the SumTypeNoDefaultCtor can be used to disable this behavior.
Constructors
| Name | Description | 
|---|---|
| this(value) | Constructs a SumTypeholding a specific value. | 
| this(other) | Constructs a SumTypethat's a copy of anotherSumType. | 
Methods
| Name | Description | 
|---|---|
| opAssign(rhs) | Assigns a value to a SumType. | 
| opAssign(rhs) | Copies the value from another SumTypeinto this one. | 
| opAssign(rhs) | Moves the value from another SumTypeinto this one. | 
| opEquals(rhs) | Compares two SumTypes for equality. | 
| toHash() | Returns the hash of the SumType's current value. | 
| toString() | Returns a string representation of the SumType's current value. | 
| toString(sink, fmt) | Handles formatted writing of the SumType's current value. | 
Aliases
| Name | Description | 
|---|---|
| Types | The types a SumTypecan hold. | 
See Also
Authors
Paul Backus
License
Boost License 1.0