Re: Unicode Bidi Brackets in D std library?

2017-05-11 Thread Las via Digitalmars-d-learn
On Thursday, 11 May 2017 at 19:05:46 UTC, Las wrote: On Thursday, 11 May 2017 at 18:59:12 UTC, ag0aep6g wrote: On 05/11/2017 08:27 PM, Las wrote: I see no way of getting [these](http://unicode.org/Public/UCD/latest/ucd/BidiBrackets.txt) properties for unicode code points in the std.uni

Re: Unicode Bidi Brackets in D std library?

2017-05-11 Thread Las via Digitalmars-d-learn
On Thursday, 11 May 2017 at 18:59:12 UTC, ag0aep6g wrote: On 05/11/2017 08:27 PM, Las wrote: I see no way of getting [these](http://unicode.org/Public/UCD/latest/ucd/BidiBrackets.txt) properties for unicode code points in the std.uni library. How do I get these properties? Looks like it's

Unicode Bidi Brackets in D std library?

2017-05-11 Thread Las via Digitalmars-d-learn
I see no way of getting [these](http://unicode.org/Public/UCD/latest/ucd/BidiBrackets.txt) properties for unicode code points in the std.uni library. How do I get these properties?

Phobos and LTO

2017-03-05 Thread Las via Digitalmars-d
Is Phobos compiled with LTO enabled?

Re: foreach over pointers OR foreach that mutates the iterator

2017-01-26 Thread Las via Digitalmars-d
On Thursday, 26 January 2017 at 11:32:09 UTC, ZombineDev wrote: Anyway, another solution is to use refRange: void main() { import std.range : refRange; S s; auto p = refRange(); foreach(i; p) writeln(i); } That way you don't need to dereference 'p' everytime you want

Re: foreach over pointers OR foreach that mutates the iterator

2017-01-26 Thread Las via Digitalmars-d
On Wednesday, 25 January 2017 at 20:22:54 UTC, Jonathan M Davis wrote: It only matters if you're trying to define the range primitives for your range as free functions for some reason. Just put them on the type itself and be done with it. The only reason that wouldn't work would be if you

foreach over pointers OR foreach that mutates the iterator

2017-01-25 Thread Las via Digitalmars-d
So the reference says that (when range has the properties) `foreach (e; range) { ... }` is equivalent to: for (auto __r = range; !__r.empty; __r.popFront()) { auto e = __r.front; ... } Though this isn't always true, as when I use this struct: struct S { int front = 10;

Re: alias and UFCS

2017-01-24 Thread Las via Digitalmars-d-learn
On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote: This code: T tFunc(alias F, T)(T n) { n.F; return n; } Produces this error: Error: no property 'F' for type 'int[]' (or whatever type I use). The alias rules for functions seem to be incompatible with UFCS, F(n)