DIP 1017--Add Bottom Type--Community Review Round 1
Timon Gehr
timon.gehr at gmx.ch
Sat Aug 11 00:01:34 UTC 2018
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);
}
More information about the Digitalmars-d
mailing list