aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/gdc31.d
blob: 97dc88d551e19634ee0b2ff4817d285c5c192101 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// https://bugzilla.gdcproject.org/show_bug.cgi?id=31
// { dg-do compile }

class RedBlackTree(T, alias less)
{
    struct Range
    {
        @property empty() { }
    }

    Range opSlice()
    {
        return Range();
    }
}

auto redBlackTree(alias less, E)()
{
    return new RedBlackTree!(E, less);
}

void test31()
{
    redBlackTree!((a){}, double)();
}