On Wednesday, 20 August 2014 at 20:18:15 UTC, Dicebot wrote:
On Wednesday, 20 August 2014 at 20:01:05 UTC, Colin wrote:
I see 3 distinct parts playing a role in my confusion:
A) The 'is' keyword. What does it do when you have
is(expression);
http://dlang.org/expression.html#IsExpression
It
Hi,
I'm implementing some template checks on some types I'm using in
a project, and went to phobos for some indications on how to use
them.
In std.range, I see this construct quite a bit:
template isInputRange(R)
{
enum bool isInputRange = is(typeof(
(inout int = 0)
{
R
On Wed, 20 Aug 2014 20:01:03 +, Colin wrote:
It looks veryhacky.
I see 3 distinct parts playing a role in my confusion:
A) The 'is' keyword. What does it do when you have is(expression);
B) typeof( expression ); whats this doing? Particularly when the
expression its acting on is a
On Wednesday, 20 August 2014 at 20:01:05 UTC, Colin wrote:
I see 3 distinct parts playing a role in my confusion:
A) The 'is' keyword. What does it do when you have
is(expression);
http://dlang.org/expression.html#IsExpression
It is a tool for type checking. It has many options but plain
On Wednesday, 20 August 2014 at 20:12:58 UTC, Justin Whear wrote:
On Wed, 20 Aug 2014 20:01:03 +, Colin wrote:
It looks veryhacky.
I see 3 distinct parts playing a role in my confusion:
A) The 'is' keyword. What does it do when you have
is(expression);
B) typeof( expression ); whats
On Wednesday, 20 August 2014 at 20:39:42 UTC, Jonathan M Davis
wrote:
is(typeof(foo)) and __traits(compiles, foo) are not the same.
The first tests for the existence of the symbol, whereas the
second checks whether the code will actually compile.
Is that even true? I mean, are you just
On Wednesday, 20 August 2014 at 21:06:49 UTC, monarch_dodra wrote:
On Wednesday, 20 August 2014 at 20:39:42 UTC, Jonathan M Davis
wrote:
is(typeof(foo)) and __traits(compiles, foo) are not the same.
The first tests for the existence of the symbol, whereas the
second checks whether the code