```
   bool wasFound(I)(I result)
    {
        return(result != -1);
    }

    bool existPoint(Point b, int cost)
    {
        auto i = closed.countUntil(b);

if(wasFound(i)) // -1 is returned if no point b is found in the range
```

The above compiles and executes successfully. But the following fails with: app.d(179,13): Error: no property `wasFound` for `i` of type `long`

I thought the templated function would take care of any type.
```
    bool wasFound(I)(I result)
    {
        return(result != -1);
    }

    bool existPoint(Point b, int cost)
    {
        auto i = closed.countUntil(b);  // Note: closed

if(i.wasFound()) // -1 is returned if no point b is found in the range
```

Reply via email to