Skip to content

Commit f8fbd29

Browse files
crimaniakwilzbach
authored andcommitted
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.
1 parent afbb382 commit f8fbd29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

std/bitmanip.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ private template createAccessors(
107107

108108
static if (is(T == bool))
109109
{
110-
static assert(len == 1);
110+
static assert(len == 1, "`" ~ name ~
111+
"` definition problem: type `bool` is only allowed for single-bit fields");
111112
enum result =
112113
// getter
113114
"@property bool " ~ name ~ "() @safe pure nothrow @nogc const { return "

0 commit comments

Comments
 (0)