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:
The Dlang Bot 2018-06-10 08:49:31 +02:00 committed by GitHub
commit da4980afa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 ||
{
enum allowed = isIntegral!T ||
isFloatingPoint!T || isFloatingPoint!T ||
isSomeString!T || isSomeString!T ||
is(Unqual!T == bool) || is(Unqual!T == bool) ||
Value.allowed!T; Value.allowed!T;
}
// Stored value. // Stored value.
Value value_; Value value_;