Both std::unique_ptr and std::shared_ptr have a constexpr default constructor and a constexpr constructor for std::nullptr_t. Do the same with RefPtr.
Created attachment 446860 [details]
Created attachment 446865 [details]
Created attachment 446887 [details]
Created attachment 446892 [details]
Comment on attachment 446892 [details]
Committed r286917 (245143@main): <https://commits.webkit.org/245143@main>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 446892 [details].
I don’t think this patch actually optimizes any generated code because I’m pretty sure the old constructor got inlined and collapsed to just zero-initialization. But I like that this catches us using 0 by accident, and that it's constexpr.