Hello,

I'm working on understanding and automating the contents of an X Json file generated by LDC2.
I'm testing it by processing the whole Phobos lib.

The weirdest thing that I've found is this:
X Json:
```

```
With my program, I transformed into this header source code:
```d
public template isTuple(T) {enum isTuple = __traits(compiles, ()
{
template f(Specs...)f(T.init);
}
);}
```

Then the parser in my custom IDE was stopped with error: It can't handle template with the ';' ending. So I temporarily enabled that form, but I can't find that template; form in the documentation. I only found info about template{}.

Later I've found that the "template f(Specs...)f(T.init);" thing is also in the DDoc of the std.typecons.d module.

```d
enum isTuple(T) = __traits(compiles, () { template f(Specs...)f(T.init); } );
```
(It's just embedded code in the json as a string. So it was the same at me as well.)

Anyone can explain me what
```d
template f(Specs...)f(T.init);
```
means?

From now on, I will detect it as valid, but please help me understand it.

Thx in advance!
  • Template declara... realhet via Digitalmars-d-learn
    • Re: Templat... monkyyy via Digitalmars-d-learn
      • Re: Tem... realhet via Digitalmars-d-learn
        • Re:... realhet via Digitalmars-d-learn
          • ... monkyyy via Digitalmars-d-learn
            • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
              • ... monkyyy via Digitalmars-d-learn
    • Re: Templat... Steven Schveighoffer via Digitalmars-d-learn
      • Re: Tem... realhet via Digitalmars-d-learn
        • Re:... monkyyy via Digitalmars-d-learn
          • ... realhet via Digitalmars-d-learn

Reply via email to