Add SFINAE on additional overloads of std::complex functions. Fixes PR19921.

The functions arg, conj, imag, norm, proj, and real have additional overloads
for arguments of integral or floating point types. However these overloads should
not allow conversions to the integral/floating point types, only exact matches.

This patch constrains these functions so they no longer allow conversions.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276067 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-07-20 00:14:10 +00:00
parent 99029f12eb
commit 781fb2a738
3 changed files with 137 additions and 147 deletions

View File

@@ -170,7 +170,8 @@ class LibcxxTestFormat(object):
extra_flags += ['-fsyntax-only']
if use_verify:
extra_flags += ['-Xclang', '-verify',
'-Xclang', '-verify-ignore-unexpected=note']
'-Xclang', '-verify-ignore-unexpected=note',
'-ferror-limit=1024']
cmd, out, err, rc = self.cxx.compile(source_path, out=os.devnull,
flags=extra_flags,
disable_ccache=True)