`static` function ... cannot access variable in frame of ...

Bastiaan Veelo Bastiaan at Veelo.net
Mon Jan 15 22:23:27 UTC 2024


On Monday, 15 January 2024 at 18:43:43 UTC, user1234 wrote:
> The two calls are not equivalent.

> so what is passed as alias need to be static too.

Thanks all. I thought a static member function just isn't able to 
access the instance of the struct, but as I understand now it is 
static all the way.

What I am looking for is a way to have different structs that 
have a member function that has the same name in all of them, 
that is callable without a this pointer, and able to take an 
alias argument. That is probably asking too much.

-- Bastiaan.


More information about the Digitalmars-d-learn mailing list