On Sunday, 14 June 2015 at 10:29:09 UTC, anonymous wrote:
On Sunday, 14 June 2015 at 10:10:51 UTC, ketmar wrote:
i.e. when it need a value in compile time. the interpreter is
invoked, it evaluates (interprets) the given code (function or
template instantiation), and then it returns result (or r
On Sunday, 14 June 2015 at 10:04:35 UTC, John Colvin wrote:
On Sunday, 14 June 2015 at 09:46:56 UTC, JDemler wrote:
On Sunday, 14 June 2015 at 05:52:00 UTC, ketmar wrote:
oh, seems that i managed to make everything even less
understandable...
Your code works perfectly and makes at least some
On Sunday, 14 June 2015 at 05:52:00 UTC, ketmar wrote:
oh, seems that i managed to make everything even less
understandable...
Your code works perfectly and makes at least some sense to me.
Thank you.
If i understand it correctly: __traits-time =
templateinstatiation-time = pragma-time befo
On Saturday, 13 June 2015 at 23:51:32 UTC, JDemler wrote:
I have another one :)
module test;
struct S{
string member1;
int member2;
}
string test(string[] a)
{
const S s = { member1:"It is also important to go to Mars!"};
const string y = a[0];
return y;
}
void main()
{
enum e = [
I have another one :)
module test;
struct S{
string member1;
int member2;
}
string test(string[] a)
{
const S s = { member1:"It is also important to go to Mars!"};
const string y = a[0];
return y;
}
void main()
{
enum e = ["member1","member2"];
pragma(msg, e[0]);
pragma(msg, te
On Saturday, 13 June 2015 at 10:26:06 UTC, Marc Schütz wrote:
On Saturday, 13 June 2015 at 10:01:45 UTC, JDemler wrote:
Hey,
i am trying to wrap my head around __traits.
One thing i just do not understand is following:
struct S{
string member1;
int member2;
}
void main(string[] args)
{
Hey,
i am trying to wrap my head around __traits.
One thing i just do not understand is following:
struct S{
string member1;
int member2;
}
void main(string[] args)
{
foreach(typeStr; __traits(allMembers, S))
{
auto tp = __traits(getMember, S, typeStr);
static if (__trait