simplify Node.allowed

This commit is contained in:
Cameron Ross 2018-06-10 02:51:51 -03:00
parent eec7aa3bba
commit 157c2c005f
No known key found for this signature in database
GPG key ID: 777897D98DC91C54

View file

@ -183,14 +183,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;
}
package: package:
// Stored value. // Stored value.