[libcxx] Fix SFINAE in <cmath>. Patch from K-Ballo.
authorEric Fiselier <eric@efcs.ca>
Fri, 17 Oct 2014 00:31:47 +0000 (00:31 +0000)
committerEric Fiselier <eric@efcs.ca>
Fri, 17 Oct 2014 00:31:47 +0000 (00:31 +0000)
commit07df631129ee5464edaad7eea9e203d4a109f259
tree5d32de245dab2141be933cacd7e2a7a6dfe1d80d
parent1444bb9fc8ff56ae7dc2f9f22fa3518f91dc8d1f
[libcxx] Fix SFINAE in <cmath>. Patch from K-Ballo.

Delay instantiation of `__numeric_type` within <cmath>,
don't instantiate it when the `is_arithmetic` conditions do not hold as it causes
errors with user-defined types with ambiguous conversions. Fixes PR21083.

llvm-svn: 219998
libcxx/include/cmath
libcxx/include/type_traits
libcxx/test/numerics/c.math/cmath.pass.cpp