Allow structs with non-marshaled non-canDBus fields (#28)

This commit is contained in:
thaven 2017-11-04 15:12:56 +01:00 committed by GitHub
parent 279c3ab00b
commit 99cb6cb071
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 5 deletions

View file

@ -344,7 +344,8 @@ void readIterTuple(Tup)(DBusMessageIter *iter, ref Tup tuple) if(isTuple!Tup &&
}
}
void readIterStruct(S)(DBusMessageIter *iter, ref S s) if(is(S == struct) && allCanDBus!(Fields!S)) {
void readIterStruct(S)(DBusMessageIter *iter, ref S s) if(is(S == struct) && canDBus!S)
{
foreach(index, T; Fields!S) {
static if (isAllowedField!(s.tupleof[index])) {
s.tupleof[index] = readIter!T(iter);