Hi there,
I recently read the 'More Templates' chapter of Ali's book (-- thanks
for that ;) ).
At the section 'Named constraints', there were a definition like this:
template isUsable(T)
{
enum isUsable = is ( typeof(
{
T obj;
obj.call();
obj.otherCall(1);
On 4/22/14, Tim Holzschuh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
What does (inout int = 0) mean/affect here?
This was asked recently, see my reponse here:
http://forum.dlang.org/post/mailman.102.1396007039.25518.digitalmars-d-le...@puremagic.com
On Tue, 22 Apr 2014 10:58:41 -0400, Andrej Mitrovic via
Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On 4/22/14, Tim Holzschuh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
What does (inout int = 0) mean/affect here?
This was asked recently, see my
Not sure what InputRange is defined as atm, but I don't think
anything should have to define init to be a valid inputrange.
On Tuesday, 22 April 2014 at 15:06:34 UTC, Steven Schveighoffer
wrote:
Note, is the r2 = R.init needed? Not sure.
Yes: It R2 has no default init, or is an immutable, then that
line will fail to compile.
On Tue, 22 Apr 2014 11:15:14 -0400, monarch_dodra monarchdo...@gmail.com
wrote:
On Tuesday, 22 April 2014 at 15:06:34 UTC, Steven Schveighoffer wrote:
Note, is the r2 = R.init needed? Not sure.
Yes: It R2 has no default init, or is an immutable, then that line will
fail to compile.
I
On 4/22/14, Steven Schveighoffer via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com I think this can be fixed a
different way.
Feel free to file a bug / make a pull. :
On Tuesday, 22 April 2014 at 15:30:36 UTC, Steven Schveighoffer
wrote:
On Tue, 22 Apr 2014 11:15:14 -0400, monarch_dodra
monarchdo...@gmail.com wrote:
On Tuesday, 22 April 2014 at 15:06:34 UTC, Steven
Schveighoffer wrote:
Note, is the r2 = R.init needed? Not sure.
Yes: It R2 has no default
On 04/22/2014 07:07 AM, Tim Holzschuh via Digitalmars-d-learn wrote:
read the 'More Templates' chapter of Ali's book (-- thanks
for that ;) ).
Yay! :)
At the section 'Named constraints', there were a definition like this:
template isUsable(T)
{
enum isUsable = is ( typeof(
{
Am 22.04.2014 16:58, schrieb Andrej Mitrovic via Digitalmars-d-learn:
On 4/22/14, Tim Holzschuh via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
What does (inout int = 0) mean/affect here?
This was asked recently, see my reponse here:
On Tue, 22 Apr 2014 11:36:07 -0400, monarch_dodra monarchdo...@gmail.com
wrote:
On Tuesday, 22 April 2014 at 15:30:36 UTC, Steven Schveighoffer wrote:
Also, an immutable can be initialized that way:
immutable int[] = int[].init;
Isn't that exactly R.init ?
Yes, you said if it's an
On Tue, 22 Apr 2014 14:50:44 -0400, monarch_dodra monarchdo...@gmail.com
wrote:
On Tuesday, 22 April 2014 at 18:35:58 UTC, Steven Schveighoffer wrote:
On Tue, 22 Apr 2014 11:36:07 -0400, monarch_dodra
monarchdo...@gmail.com wrote:
On Tuesday, 22 April 2014 at 15:30:36 UTC, Steven
12 matches
Mail list logo