[webkit-dev] NeverNull<T>

Adam Barth abarth at webkit.org
Tue Jul 28 16:55:30 PDT 2009


On Tue, Jul 28, 2009 at 4:29 PM, Jozwiak, John<jjozwiak at qualcomm.com> wrote:
> Isn't the C++ "reference" annotation
>
>  char & x;
>
> tantamount to declaration of a pointer
>
>  char * x;
>
> to whom NULL assignment, as detectable at compile time, is a compile-time error?

I'm not sure what you mean by "as detectable at compile time," but
I've certainly fixed crashers that were caused by NULL references.
Templates should give you stronger properties, although you might have
to do some fancy footwork to make subtyping work correctly.

Adam


More information about the webkit-dev mailing list