Node size info at compile-time

This commit is contained in:
Ferdinand Majerech 2014-05-19 19:53:33 +02:00
parent cd7d60bb0e
commit f45323473c

View file

@ -222,6 +222,7 @@ struct Node
//Node collection style. Used to remember style this node was loaded with.
CollectionStyle collectionStyle = CollectionStyle.Invalid;
pragma(msg, "Node is %s bytes long".format(Node.sizeof));
static assert(Value.sizeof <= 24, "Unexpected YAML value size");
static assert(Node.sizeof <= 48, "Unexpected YAML node size");