summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-01-31 21:42:39 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-01-31 21:42:39 +0000
commit0551d83ed50d66f90badacdb070b1bde607a0b66 (patch)
tree93cf7413257f3ff1e4444246a1ae57fc0a0b3740
parent7faa9dac84b80a9160512e4e1a14f2cfca66d38a (diff)
downloadbcm5719-llvm-0551d83ed50d66f90badacdb070b1bde607a0b66.tar.gz
bcm5719-llvm-0551d83ed50d66f90badacdb070b1bde607a0b66.zip
Implement LWG2870: Default value of parameter theta of polar should be dependent
llvm-svn: 323918
-rw-r--r--libcxx/include/complex4
-rw-r--r--libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp2
-rw-r--r--libcxx/www/cxx2a_status.html4
3 files changed, 5 insertions, 5 deletions
diff --git a/libcxx/include/complex b/libcxx/include/complex
index 41a47cfba47..c7c1cdedf4d 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -203,7 +203,7 @@ template<class T> complex<T> proj(const complex<T>&);
template<Integral T> complex<double> proj(T);
complex<float> proj(float);
-template<class T> complex<T> polar(const T&, const T& = 0);
+template<class T> complex<T> polar(const T&, const T& = T());
// 26.3.8 transcendentals:
template<class T> complex<T> acos(const complex<T>&);
@@ -991,7 +991,7 @@ proj(_Tp __re)
template<class _Tp>
complex<_Tp>
-polar(const _Tp& __rho, const _Tp& __theta = _Tp(0))
+polar(const _Tp& __rho, const _Tp& __theta = _Tp())
{
if (__libcpp_isnan_or_builtin(__rho) || signbit(__rho))
return complex<_Tp>(_Tp(NAN), _Tp(NAN));
diff --git a/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp b/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp
index 5e6cb0d523c..69463ded2b4 100644
--- a/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp
+++ b/libcxx/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp
@@ -11,7 +11,7 @@
// template<class T>
// complex<T>
-// polar(const T& rho, const T& theta = 0);
+// polar(const T& rho, const T& theta = T()); // changed from '0' by LWG#2870
#include <complex>
#include <cassert>
diff --git a/libcxx/www/cxx2a_status.html b/libcxx/www/cxx2a_status.html
index 68206cb7f79..684ed7da2e7 100644
--- a/libcxx/www/cxx2a_status.html
+++ b/libcxx/www/cxx2a_status.html
@@ -106,7 +106,7 @@
<tr><td></td><td></td><td></td><td></td></tr>
<tr><td><a href="https://wg21.link/LWG2779">2779</a></td><td>[networking.ts] Relax requirements on buffer sequence iterators</td><td>Albuquerque</td><td></td></tr>
- <tr><td><a href="https://wg21.link/LWG2870">2870</a></td><td>Default value of parameter theta of polar should be dependent</td><td>Albuquerque</td><td></td></tr>
+ <tr><td><a href="https://wg21.link/LWG2870">2870</a></td><td>Default value of parameter theta of polar should be dependent</td><td>Albuquerque</td><td>Complete</td></tr>
<tr><td><a href="https://wg21.link/LWG2935">2935</a></td><td>What should create_directories do when p already exists but is not a directory?</td><td>Albuquerque</td><td></td></tr>
<tr><td><a href="https://wg21.link/LWG2941">2941</a></td><td>[thread.req.timing] wording should apply to both member and namespace-level functions</td><td>Albuquerque</td><td><i>Nothing to do</i></td></tr>
<tr><td><a href="https://wg21.link/LWG2944">2944</a></td><td>LWG 2905 accidentally removed requirement that construction of the deleter doesn't throw an exception</td><td>Albuquerque</td><td><i>Nothing to do</i></td></tr>
@@ -135,7 +135,7 @@
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
</table>
- <p>Last Updated: 24-Jan-2018</p>
+ <p>Last Updated: 31-Jan-2018</p>
</div>
</body>
</html>
OpenPOWER on IntegriCloud