Re: Concatenating compile time sequences

2019-03-03 Thread aliak via Digitalmars-d-learn
On Saturday, 2 March 2019 at 02:38:09 UTC, H. S. Teoh wrote: On Sat, Mar 02, 2019 at 02:16:22AM +, Victor Porton via Digitalmars-d-learn wrote: [...] Keep in mind that sequences produced by AliasSeq are auto-expanding, meaning the above construct will automatically flatten into a flat

Re: Concatenating compile time sequences

2019-03-01 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Mar 02, 2019 at 02:16:22AM +, Victor Porton via Digitalmars-d-learn wrote: > I try to split a compile time sequence of types and names into a > sequence consisting of two-element subsequences (each of type and > name). > > That is, I want to transform: > > (int, "x", float, "y",

Concatenating compile time sequences

2019-03-01 Thread Victor Porton via Digitalmars-d-learn
I try to split a compile time sequence of types and names into a sequence consisting of two-element subsequences (each of type and name). That is, I want to transform: (int, "x", float, "y", double, "z") into (AliasSeq!(int, "x"), AliasSeq!(float, "y"), AliasSeq!(double, "z")) I am

Re: Compile time sequences

2018-10-04 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, October 4, 2018 5:44:55 AM MDT drug via Digitalmars-d-learn wrote: > I was incorrect with description of the problem. The problem is that > there is no simple way to distinct types and symbols if symbols are > private. Because private symbol is not accessible you can not get any >

Re: Compile time sequences

2018-10-04 Thread drug via Digitalmars-d-learn
04.10.2018 14:44, drug пишет: I was incorrect with description of the problem. The problem is that there is no simple way to distinct types and symbols if symbols are private. Because private symbol is not accessible you can not get any info on it, including is it type or symbol or value. And

Re: Compile time sequences

2018-10-04 Thread drug via Digitalmars-d-learn
I was incorrect with description of the problem. The problem is that there is no simple way to distinct types and symbols if symbols are private. Because private symbol is not accessible you can not get any info on it, including is it type or symbol or value. And you can not get protection for

Re: Compile time sequences

2018-10-03 Thread drug via Digitalmars-d-learn
On 03.10.2018 20:22, Paul Backus wrote: In my experience doing metaprogramming in D, it's best to make your static if/template constraint tests as narrow and specific as possible. For example, if you want to know whether you can call a function with a particular argument, you don't need to

Re: Compile time sequences

2018-10-03 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 3 October 2018 at 07:57:07 UTC, drug wrote: According to https://dlang.org/articles/ctarguments.html compile time sequences "...allow a programmer to operate on types, symbols and values..." Phobos has `isType`/`isTypeTuple` traits, also `isExpressions` where expr

Compile time sequences

2018-10-03 Thread drug via Digitalmars-d-learn
According to https://dlang.org/articles/ctarguments.html compile time sequences "...allow a programmer to operate on types, symbols and values..." Phobos has `isType`/`isTypeTuple` traits, also `isExpressions` where expression may contain both values and symbols, but has no t