mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
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:
parent
afbb382e90
commit
f8fbd2976d
1 changed files with 2 additions and 1 deletions
|
@ -107,7 +107,8 @@ private template createAccessors(
|
||||||
|
|
||||||
static if (is(T == bool))
|
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 =
|
enum result =
|
||||||
// getter
|
// getter
|
||||||
"@property bool " ~ name ~ "() @safe pure nothrow @nogc const { return "
|
"@property bool " ~ name ~ "() @safe pure nothrow @nogc const { return "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue