comparison d2/qtd/meta/Compiletime.d @ 372:a032df77b6ab

Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
author Max Samukha <maxter@spambox.com>
date Thu, 08 Jul 2010 17:19:05 +0300
parents da4235301224
children
comparison
equal deleted inserted replaced
370:7fd4b69378bf 372:a032df77b6ab
311 mixin InnerAttribute!(attrClass, AttributeOptions.none, A); 311 mixin InnerAttribute!(attrClass, AttributeOptions.none, A);
312 } 312 }
313 313
314 private mixin template AttributeImpl(alias symbol, string attrClass, AttributeOptions opts, size_t index, A...) 314 private mixin template AttributeImpl(alias symbol, string attrClass, AttributeOptions opts, size_t index, A...)
315 { 315 {
316 import std.typetuple;
317
316 private enum attrId = attributeId!(symbol, index) ~ (opts & AttributeOptions.inner ? "_inner" : ""); 318 private enum attrId = attributeId!(symbol, index) ~ (opts & AttributeOptions.inner ? "_inner" : "");
317 319
318 static if (is(typeof(mixin(attrId)))) 320 static if (is(typeof(mixin(attrId))))
319 { 321 {
320 mixin ("alias " ~ attrId ~ " attr;"); 322 mixin ("alias " ~ attrId ~ " attr;");