How/where to hack DMD to generate docs for string mixed members.

2018-04-14 Thread 9il via Digitalmars-d-learn
Hey, How/where to hack DMD to generate docs for string mixed members? struct S { mixin(" /// auto bar() {} "); } Best regards, Ilya Yaroshenko

Re: Why is the error message coming by the end of the compilation?

2018-04-14 Thread bauss via Digitalmars-d-learn
On Saturday, 14 April 2018 at 17:58:20 UTC, Steven Schveighoffer wrote: On 4/14/18 4:16 AM, bauss wrote: I tried to use __traits(compiles) but it always returns false for the code I'm going to mixin, even though it's valid, that was my initial go to, so this is really a second attempt on

Re: Why is the error message coming by the end of the compilation?

2018-04-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/14/18 4:16 AM, bauss wrote: I tried to use __traits(compiles) but it always returns false for the code I'm going to mixin, even though it's valid, that was my initial go to, so this is really a second attempt on something to give meaningful error messages when certain mixins don't

Re: template evaluation

2018-04-14 Thread Alex via Digitalmars-d-learn
Ok, trying to reduce my example a little bit, I arrived at this: ´´´ void main(){} struct D { size_t dummy; auto static s = S!D.init; } struct S(alias container = null) { pragma(msg, container); static if(__traits(compiles, __traits(allMembers,

template evaluation

2018-04-14 Thread Alex via Digitalmars-d-learn
Hi all, I must overlook something, but given this: ´´´ void main(){} static assert(isMatching!(D, S!(D, true))); // place 1: works as expected. struct D { auto static s = S!(typeof(this), true).init; } enum bool isMatching(T, U) = (){ bool b;

Re: Why is the error message coming by the end of the compilation?

2018-04-14 Thread bauss via Digitalmars-d-learn
On Friday, 13 April 2018 at 21:20:26 UTC, Ikeran wrote: On Friday, 13 April 2018 at 20:50:38 UTC, bauss wrote: What I'm doing is basically this: static foreach (viewResult; generateViewsResult) { pragma(msg, "Compiling: " ~ viewResult.name); mixin(viewResult.source);

Re: Why is the error message coming by the end of the compilation?

2018-04-14 Thread bauss via Digitalmars-d-learn
On Friday, 13 April 2018 at 21:22:13 UTC, Steven Schveighoffer wrote: On 4/13/18 4:50 PM, bauss wrote: I can't seem to reproduce this with any other smaller projects, so my question is really what could trigger this behavior. See: https://i.imgur.com/OmqJ8Sr.png Whenever I try to just do