From 918395ea64435e4f22b7ab9052bc52ae93e31c98 Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Fri, 25 Jul 2014 03:33:27 +0200 Subject: [PATCH] Enforcing that Token is at most 32 bytes long. --- source/dyaml/token.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/dyaml/token.d b/source/dyaml/token.d index 6ec259b..2625df2 100644 --- a/source/dyaml/token.d +++ b/source/dyaml/token.d @@ -77,6 +77,8 @@ struct Token /// Get string representation of the token ID. @property string idString() @safe pure const {return id.to!string;} } +static assert(Token.sizeof <= 32, "Token has unexpected size"); + @safe pure nothrow @nogc: