[libcxx] r323918 - Implement LWG2870: Default value of parameter theta of polar should be dependent

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 13:42:39 PST 2018


Author: marshall
Date: Wed Jan 31 13:42:39 2018
New Revision: 323918

URL: http://llvm.org/viewvc/llvm-project?rev=323918&view=rev
Log:
Implement LWG2870: Default value of parameter theta of polar should be dependent

Modified:
    libcxx/trunk/include/complex
    libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp
    libcxx/trunk/www/cxx2a_status.html

Modified: libcxx/trunk/include/complex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/complex?rev=323918&r1=323917&r2=323918&view=diff
==============================================================================
--- libcxx/trunk/include/complex (original)
+++ libcxx/trunk/include/complex Wed Jan 31 13:42:39 2018
@@ -203,7 +203,7 @@ template<class T>    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));

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp?rev=323918&r1=323917&r2=323918&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.value.ops/polar.pass.cpp Wed Jan 31 13:42:39 2018
@@ -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>

Modified: libcxx/trunk/www/cxx2a_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx2a_status.html?rev=323918&r1=323917&r2=323918&view=diff
==============================================================================
--- libcxx/trunk/www/cxx2a_status.html (original)
+++ libcxx/trunk/www/cxx2a_status.html Wed Jan 31 13:42:39 2018
@@ -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>




More information about the cfe-commits mailing list