Add static assertion error message.
This commit is contained in:
parent
7bc5606ac7
commit
2be696fe01
|
@ -343,7 +343,8 @@ unittest { // tuple fields
|
||||||
bool areConvertibleTo(alias TYPES, alias TARGET_TYPES)()
|
bool areConvertibleTo(alias TYPES, alias TARGET_TYPES)()
|
||||||
if (isGroup!TYPES && isGroup!TARGET_TYPES)
|
if (isGroup!TYPES && isGroup!TARGET_TYPES)
|
||||||
{
|
{
|
||||||
static assert(TYPES.expand.length == TARGET_TYPES.expand.length);
|
static assert(TYPES.expand.length == TARGET_TYPES.expand.length,
|
||||||
|
"Argument count does not match.");
|
||||||
foreach (i, V; TYPES.expand)
|
foreach (i, V; TYPES.expand)
|
||||||
if (!is(V : TARGET_TYPES.expand[i]))
|
if (!is(V : TARGET_TYPES.expand[i]))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue