[PATCH] [libcxx] Fixes libc++ bug #19921 - Remove additional overloads for std::complex

Eric Fiselier eric at efcs.ca
Wed Jul 9 18:48:54 PDT 2014


Hi mclow.lists,

http://llvm.org/bugs/show_bug.cgi?id=19921

This patch affects std::complexes additional overloads for arg, conj, imag, norm, proj and real.

For overloads now only participate in overload resolution if they are called with an arithmetic type. 
Previously they could be called with types that were convertible to arithmetic types.

The arg and proj functions had to be had to be treated differently than the test of the overloads since the body of their function needs to differ depending on what type was passed it.

http://reviews.llvm.org/D4447

Files:
  include/complex
  test/numerics/complex.number/cmplx.over/arg.convertible/double.fail.cpp
  test/numerics/complex.number/cmplx.over/arg.convertible/float.fail.cpp
  test/numerics/complex.number/cmplx.over/arg.convertible/int.fail.cpp
  test/numerics/complex.number/cmplx.over/arg.convertible/long_double.fail.cpp
  test/numerics/complex.number/cmplx.over/conj.convertible/double.fail.cpp
  test/numerics/complex.number/cmplx.over/conj.convertible/float.fail.cpp
  test/numerics/complex.number/cmplx.over/conj.convertible/int.fail.cpp
  test/numerics/complex.number/cmplx.over/conj.convertible/long_double.fail.cpp
  test/numerics/complex.number/cmplx.over/imag.convertible/double.fail.cpp
  test/numerics/complex.number/cmplx.over/imag.convertible/float.fail.cpp
  test/numerics/complex.number/cmplx.over/imag.convertible/int.fail.cpp
  test/numerics/complex.number/cmplx.over/imag.convertible/long_double.fail.cpp
  test/numerics/complex.number/cmplx.over/norm.convertible/double.fail.cpp
  test/numerics/complex.number/cmplx.over/norm.convertible/float.fail.cpp
  test/numerics/complex.number/cmplx.over/norm.convertible/int.fail.cpp
  test/numerics/complex.number/cmplx.over/norm.convertible/long_double.fail.cpp
  test/numerics/complex.number/cmplx.over/proj.convertible/double.fail.cpp
  test/numerics/complex.number/cmplx.over/proj.convertible/float.fail.cpp
  test/numerics/complex.number/cmplx.over/proj.convertible/int.fail.cpp
  test/numerics/complex.number/cmplx.over/proj.convertible/long_double.fail.cpp
  test/numerics/complex.number/cmplx.over/real.convertible/double.fail.cpp
  test/numerics/complex.number/cmplx.over/real.convertible/float.fail.cpp
  test/numerics/complex.number/cmplx.over/real.convertible/int.fail.cpp
  test/numerics/complex.number/cmplx.over/real.convertible/long_double.fail.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4447.11236.patch
Type: text/x-patch
Size: 26393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140710/b764f783/attachment.bin>


More information about the cfe-commits mailing list