If you look at the struct, it uses the type U in, among others, the union.
The only place I could see U referenced is in the first static if, but I
cannot recreate this behavior:
void main() {
static if(is(int X == const(U), U))
{
}
else
{
static assert(is(typeof(U)
On Thursday, 29 March 2012 at 20:15:43 UTC, simendsjo wrote:
If you look at the struct, it uses the type U in, among others,
the union.
The only place I could see U referenced is in the first static
if, but I cannot recreate this behavior:
void main() {
static if(is(int X == const(U), U))
On 03/29/2012 01:51 PM, Tove wrote:
On Thursday, 29 March 2012 at 20:15:43 UTC, simendsjo wrote:
If you look at the struct, it uses the type U in, among others, the
union.
The only place I could see U referenced is in the first static if, but
I cannot recreate this behavior:
void main() {
stati
On Thu, 29 Mar 2012 22:15:41 +0200, simendsjo wrote:
If you look at the struct, it uses the type U in, among others, the
union.
The only place I could see U referenced is in the first static if, but I
cannot recreate this behavior:
void main() {
static if(is(int X == const(U), U))
On Fri, 30 Mar 2012 01:09:06 +0200, Simen Kjærås
wrote:
On Thu, 29 Mar 2012 22:15:41 +0200, simendsjo
wrote:
If you look at the struct, it uses the type U in, among others, the
union.
The only place I could see U referenced is in the first static if, but
I cannot recreate this behav
On Fri, 30 Mar 2012 15:03:49 +0200, simendsjo wrote:
On Fri, 30 Mar 2012 01:09:06 +0200, Simen Kjærås
wrote:
On Thu, 29 Mar 2012 22:15:41 +0200, simendsjo
wrote:
If you look at the struct, it uses the type U in, among others, the
union.
The only place I could see U referenced is in
On Fri, 30 Mar 2012 17:13:25 +0200, Simen Kjærås
wrote:
Indeed. The thing is - U is basically *set* by the isExpression. It says
'yes, there is such a U, so I'll add it to the local scope.'. This means
that U will be set for the entire scope within which the static if
exists.
Due to the way t
On Fri, Mar 30, 2012 at 01:09, Simen Kjærås wrote:
> The same pattern is used in std.typecons.isTuple:
>
> template isTuple(T)
> {
> static if (is(Unqual!T Unused : Tuple!Specs, Specs...))
> {
Wait, does that work now? They added 'is(XXX, YYY...)'?
On 03/30/2012 09:20 PM, Philippe Sigaud wrote:
On Fri, Mar 30, 2012 at 01:09, Simen Kjærås wrote:
The same pattern is used in std.typecons.isTuple:
template isTuple(T)
{
static if (is(Unqual!T Unused : Tuple!Specs, Specs...))
{
Wait, does that work now?
Yes.
They added 'is(XXX, Y
On Fri, Mar 30, 2012 at 23:00, Timon Gehr wrote:
>> Wait, does that work now?
>
>
> Yes.
>
>
>> They added 'is(XXX, YYY...)'?
>
>
> The syntax is static if(is(XXX Unused, YYY...)). (Where Unused is something
> you never have any use for.)
OK, time to update my template tutorial, then.
On Fri, 30 Mar 2012 19:52:50 +0200, simendsjo wrote:
On Fri, 30 Mar 2012 17:13:25 +0200, Simen Kjærås
wrote:
Indeed. The thing is - U is basically *set* by the isExpression. It says
'yes, there is such a U, so I'll add it to the local scope.'. This means
that U will be set for the entire sc
11 matches
Mail list logo