On 24 May 2017 at 14:35, Marshall Clow via Phabricator via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> mclow.lists added a comment.
>
> This broke a libc++ test.  The following is expected to fail to compile:
>
>   #include <complex>
>   #include <cassert>
>
>   int main()
>   {
>       std::complex<float> foo  = 1.0if;  // should fail w/conversion
> operator not found
>   }
>
> when build as C++1z


I think this is expected. Clang has an extension where it treats 1.0if as a
_Complex float if no operator""if is available; libc++ has an extension
where std::complex<float> can be initialized from _Complex float. For the
same reason, that code has historically worked in C++11 and C++98 modes.
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to