November 15, 2014 Calling to!string with null std.typecons.Rebindable results in segfault | ||||
|---|---|---|---|---|
| ||||
Hi guys!
I'm implementing a mixin for sinking the values of all class members which can be used like this:
class MyFancyClassWithAlotOfMembers
{
// Many members here...
void toString(scope void delegate(const(char)[]) sink) const
{
import utils.prettyPrint;
mixin(toStrBody); // <- Magic happens here
}
}
Here is how I have implemented it:
https://github.com/ZombineDev/Chess2RT/blob/master/source/util/prettyprint.d
While doing so I stumbled on this bug:
http://dpaste.dzfl.pl/875844035550
My questions are:
1) Is this a Phobos bug indeed? If so I will file a bug report.
2) Is there a better way to workaround the bug (without the compiles __trait)?
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply