Re: isImplictlyConvertible for Variadic Templates

2017-06-26 Thread ag0aep6g via Digitalmars-d-learn
On 06/27/2017 02:59 AM, rpeio wrote: struct Foo(V) { this(Vs...)(Vs values) if (eachIsImplictlyConvertible!(T, Vs)) { // do stuff } } This can be accomplished off the top of my head by taking the code from std.traits for "isImplicitlyConvertible" and making the following cha

isImplictlyConvertible for Variadic Templates

2017-06-26 Thread rpeio via Digitalmars-d-learn
I was wondering whether there was a method built into phobos for expanding the "isImplictlyConvertible" template to work for variadic templates. To explain what I mean by this, normally "isImplicitlyConvertible(To, From)" checks whether or not a type "From" may implicitly be converted to a ty

Re: Zero-cost version-dependent function call at -O0.

2017-06-26 Thread Johan Engelen via Digitalmars-d-learn
On Sunday, 25 June 2017 at 23:02:28 UTC, Adam D. Ruppe wrote: On Sunday, 25 June 2017 at 22:53:07 UTC, Johan Engelen wrote: I meant semantically no call. In the existing language, I think version (or static if) at the usage and definition points both is as good as you're going to get. At t

Re: Zero-cost version-dependent function call at -O0.

2017-06-26 Thread Johan Engelen via Digitalmars-d-learn
On Sunday, 25 June 2017 at 23:02:28 UTC, Adam D. Ruppe wrote: That'd be kinda tricky because the arguments would still be liable to be evaluated... Well.. I guess someone might argue that's a mis-feature of my preprocessor example: "foo(i++)" may not do what you want. (So the C code would

Re: range of ranges into one range?

2017-06-26 Thread Jonathan Marler via Digitalmars-d-learn
On Monday, 26 June 2017 at 06:19:07 UTC, rikki cattermole wrote: Perhaps? http://dlang.org/phobos/std_algorithm_iteration.html#.joiner Thank you.

Re: [BEGINNER] reccurence! and sequence!

2017-06-26 Thread ag0aep6g via Digitalmars-d-learn
On 06/26/2017 11:51 AM, helxi wrote: auto tri = sequence!((a,n) => n*(n+1)/2)(); /** okay, it's a triangular number array * I understand n is the index number, the nth term * However where does this 'a' go? */ `a` is a tuple of the run-time arguments you pass to `sequence`. In this example,

Re: code.dlang.org package isn't automatically bumped when I push a new version tag on github

2017-06-26 Thread Nordlöw via Digitalmars-d-learn
On Monday, 26 June 2017 at 09:37:11 UTC, Basile B. wrote: Don't worry, it's just your tag that's malformed; "v1.0" while it should be "v1.0.0" so... git tag -d v1.0 and add v1.0.0 this time Thanks.

[BEGINNER] reccurence! and sequence!

2017-06-26 Thread helxi via Digitalmars-d-learn
Can someone give me a very watered-down explanation of what std.range's recurrence! and sequence! do? auto tri = sequence!((a,n) => n*(n+1)/2)(); /** okay, it's a triangular number array * I understand n is the index number, the nth term * However where does this 'a' go? */ auto odds = sequ

Re: code.dlang.org package isn't automatically bumped when I push a new version tag on github

2017-06-26 Thread Basile B. via Digitalmars-d-learn
On Monday, 26 June 2017 at 09:01:01 UTC, Nordlöw wrote: On Monday, 26 June 2017 at 08:07:56 UTC, Seb wrote: The crawler runs every hour. Though you can login and trigger a manual refresh. "Show all versions" doesn't show the latest tag version `v1.0`. Don't worry, it's just your tag that's m

Re: code.dlang.org package isn't automatically bumped when I push a new version tag on github

2017-06-26 Thread Nordlöw via Digitalmars-d-learn
On Monday, 26 June 2017 at 08:07:56 UTC, Seb wrote: The crawler runs every hour. Though you can login and trigger a manual refresh. "Show all versions" doesn't show the latest tag version `v1.0`.

Re: code.dlang.org package isn't automatically bumped when I push a new version tag on github

2017-06-26 Thread Nordlöw via Digitalmars-d-learn
On Monday, 26 June 2017 at 08:07:56 UTC, Seb wrote: The crawler runs every hour. Though you can login and trigger a manual refresh. I bumped a couple of days ago so that can't be it. How do I trigger a manual refresh?

Re: Accessing function frame from struct

2017-06-26 Thread Ali Çehreli via Digitalmars-d-learn
On 06/25/2017 06:01 AM, Sebastien Alaiwan wrote: > Hi guys, > here's my full code below. > My problem is that last "auto Y = X" assignment, that the compiler won't > accept: > > yo.globalFunction.DirectStruct.IndirectStruct.indirectMemberFunc cannot > access frame of function yo.globalFunction > >

Re: code.dlang.org package isn't automatically bumped when I push a new version tag on github

2017-06-26 Thread Seb via Digitalmars-d-learn
On Monday, 26 June 2017 at 07:51:16 UTC, Nordlöw wrote: I've made an update to version 0.1 at https://github.com/nordlow/gmp-d/tree/v0.1. But the version on http://code.dlang.org/packages/gmp-d isn't bumped to version 0.1 and I can't find a way to change it. What to do? The crawler runs ev

code.dlang.org package isn't automatically bumped when I push a new version tag on github

2017-06-26 Thread Nordlöw via Digitalmars-d-learn
I've made an update to version 0.1 at https://github.com/nordlow/gmp-d/tree/v0.1. But the version on http://code.dlang.org/packages/gmp-d isn't bumped to version 0.1 and I can't find a way to change it. What to do?