Add error message for static assert in bitmanip.d

Static assert, checking the number of bits for a field with the type
bool, did not have an error message.
This commit is contained in:
crimaniak 2018-03-15 23:48:34 +03:00 committed by Sebastian Wilzbach
parent afbb382e90
commit f8fbd2976d

View file

@ -107,7 +107,8 @@ private template createAccessors(
static if (is(T == bool))
{
static assert(len == 1);
static assert(len == 1, "`" ~ name ~
"` definition problem: type `bool` is only allowed for single-bit fields");
enum result =
// getter
"@property bool " ~ name ~ "() @safe pure nothrow @nogc const { return "