Merge pull request #145 from Herringway/allowed-simplification
simplify Node.allowed merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
commit
da4980afa3
|
@ -182,14 +182,11 @@ struct Node
|
||||||
Node.Pair[], Node[], YAMLObject) Value;
|
Node.Pair[], Node[], YAMLObject) Value;
|
||||||
|
|
||||||
// Can Value hold this type without wrapping it in a YAMLObject?
|
// Can Value hold this type without wrapping it in a YAMLObject?
|
||||||
template allowed(T)
|
enum allowed(T) = isIntegral!T ||
|
||||||
{
|
isFloatingPoint!T ||
|
||||||
enum allowed = isIntegral!T ||
|
isSomeString!T ||
|
||||||
isFloatingPoint!T ||
|
is(Unqual!T == bool) ||
|
||||||
isSomeString!T ||
|
Value.allowed!T;
|
||||||
is(Unqual!T == bool) ||
|
|
||||||
Value.allowed!T;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stored value.
|
// Stored value.
|
||||||
Value value_;
|
Value value_;
|
||||||
|
|
Loading…
Reference in a new issue