DIP 1017--Add Bottom Type--Community Review Round 1
Stefan Koch
uplink.coder at googlemail.com
Sat Aug 11 00:30:32 UTC 2018
On Saturday, 11 August 2018 at 00:01:34 UTC, Timon Gehr wrote:
> On 11.08.2018 01:40, Stefan Koch wrote:
>>>
>>> Another advantage is that you could pass null as an argument
>>> for a function template which wants to know it's element type
>>> (but of course not instantiate it) like any other pointer.
>>
>> No that cant be happing, retuning null is still returning
>> something.
>> as opposed to not returning.
>
> I think you misunderstood. His point was that this could work:
>
> void foo(T)(T* ptr){}
>
> void main(){
> foo(null);
> }
Ah yes ... Thanks!
(also I should not ignore the grammar/spell checker)
More information about the Digitalmars-d
mailing list