How to get an inout constructor working with a template wrapper
Steven Schveighoffer
schveiguy at gmail.com
Tue Jul 31 12:37:34 UTC 2018
On 7/29/18 1:46 PM, aliak wrote:
> On Sunday, 29 July 2018 at 12:45:48 UTC, Steven Schveighoffer wrote:
>>>
>>> Am I applying inout incorrectly?
>>
>> No, you need to apply it to wrap as well. I can't get run.dlang.io to
>> work for posting a link, so here is my modified version:
>>
>
> Ah bugger, right!
>
> Ok so there's no way to make explicit instantiation involving immutable
> work in the face of an inout parameter? Seems rather inconsistent no?
It's not that there's no way, the issue is simply that you are
explicitly instantiating incorrectly.
wrap!int(immutable(int)(3));
-Steve
More information about the Digitalmars-d-learn
mailing list