Cannot pass const(T) to function with ref const(T)

Andrey saasecondbox at yandex.ru
Sat Mar 13 22:16:25 UTC 2021


Hello,
Dmd gives an error:
> Error: function `_setPastBases(ref const(Data) item, ref 
> const(Word!(wstring, wstring)) base)` is not callable using 
> argument types `(const(Data), Word!(wstring, wstring))

where Data and Word - structs.

What happens and how to pass arguments?

Ldc compiles without such error.


More information about the Digitalmars-d-learn mailing list