<div dir="ltr"><div>Thanks, the exact example is exceptions. Was working really late the day that it wasn't working :D my bad. The following is what I was after, which I really thought I had tried.<br><br>class BaseException : Exception {<br>
    this(string s="", string file = __FILE__, int line = __LINE__) {<br>        super(s, file, line);<br>    }<br>}<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 11:33 AM, Dicebot <span dir="ltr"><<a href="mailto:public@dicebot.lv" target="_blank">public@dicebot.lv</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wednesday, 4 September 2013 at 09:23:44 UTC, Rory McGuire wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
thanks, yes, I just found that in TDPL. knew it was templates but forgot<br>
about template mixins.<br>
<br>
Do you know how to get a default parameter like __MODULE__ or __LINE__ to<br>
be used from the calling site?<br>
I've tried but I think my DMD is broken because it doesn't even work when I<br>
subclass Exception().<br>
</blockquote>
<br></div>
Special tokens like __LINE__ in default parameters are evaluated at the call site: <a href="http://dpaste.dzfl.pl/f7b9dfcf" target="_blank">http://dpaste.dzfl.pl/f7b9dfcf</a><br>
<br>
It does not help though, because you don't need __MODULE__ of the call site, you need list of modules it has imported in exact call scope.<br>
</blockquote></div><br></div>