On Wednesday, 19 March 2025 at 22:26:54 UTC, WhatMeWorry wrote:
```
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
```
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
On Wed, Mar 19, 2025 at 10:26:54PM +, WhatMeWorry via Digitalmars-d-learn
wrote:
[...]
> 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
On Wed, Mar 19, 2025 at 11:21:15PM +, monkyyy via Digitalmars-d-learn wrote:
[...]
> ufcs on local functions is hit or miss;
[...]
I thought it was always a miss. :-D At least, it's never worked for me
every time I tried it. I always have to move the UFCS function to
module scope, then it wo
On Wednesday, March 19, 2025 5:48:37 PM MDT H. S. Teoh via Digitalmars-d-learn
wrote:
> On Wed, Mar 19, 2025 at 11:21:15PM +, monkyyy via Digitalmars-d-learn
> wrote:
> [...]
> > ufcs on local functions is hit or miss;
> [...]
>
> I thought it was always a miss. :-D At least, it's never work
On Thursday, 20 March 2025 at 02:01:25 UTC, Jonathan M Davis
wrote:
On Wednesday, March 19, 2025 5:48:37 PM MDT H. S. Teoh via
Digitalmars-d-learn wrote:
I thought it was always a miss. :-D At least, it's never
worked for me every time I tried it. I always have to move
the UFCS function to mo