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)

Reply via email to