[llvm-bugs] [Bug 40193] Wrong overload being selected

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 1 13:59:21 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40193

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Thanks for the report. The situation here is a little complicated:

In ISO C++14 onwards, 0 cast to some other type is not a null pointer constant
any more, so cannot be implicitly converted to const char*.

This change was made in core issue 903
(http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#903), which was
moved in DR ("defect report") status, which means the intent is that it applies
retroactively to at least the prior standard. As a result, Clang applies this
change in C++11 onwards.

The extent to which other vendors track defect reports and apply them
retroactively is up to them, but this is intended behaviour in Clang.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190101/86bd4a2b/attachment.html>


More information about the llvm-bugs mailing list