C++ guys hate static_if?
Dmitry Olshansky
dmitry.olsh at gmail.com
Thu Mar 14 23:36:54 PDT 2013
15-Mar-2013 01:58, Andrei Alexandrescu пишет:
> On 3/14/13 4:37 PM, Dmitry Olshansky wrote:
>> Point taken. That doesn't detract us from:
>> a) fixing issues with -cov
>
> Yes please (are there bugzilla entries etc)?
template powerup(T) //usable as template mixin too
{
//imagine more constraints
static if(size_t.sizeof == 4)
alias bleh = blah;
else
alias bleh = oldBlah;
//...
}
Now first mixin template don't get counted at all (even code within).
Then declarations are ignored and you'll never know which ones were ever
looked at.
>
>> It counts time a LOC is executed. Would nice to add instantations
>> counter (determined at compile time) as well so as to see if
>> declarations are all covered. That + CTFE-only counted as 0.
>
> Not getting this. Example?
>
See above.
>> b) unifying template fuzzy testing in Phobos
>>
>> We have lots of these wheels reinvented across Phobos alone.
>
> Like those dummy ranges in std.algorithm?
Yes. We might as well provide a good hardy set of these as
std.testing.mockup or smth like that.
>
>> c) prototyping other higher-level tools to aid debugging generic code
>
> Yeppers!
It seems like a good application for DSL + CTFE. Even if CTFE is too
inefficient ATM for large tests a standalone tool could be prototyped
with exactly same D code.
Now that I'm saying it I'll probably prototype one just for fun :)
>
>
> Andrei
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list