[libcxx] r329484 - Use void() to create a void expression type

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 6 21:28:11 PDT 2018


Author: ericwf
Date: Fri Apr  6 21:28:11 2018
New Revision: 329484

URL: http://llvm.org/viewvc/llvm-project?rev=329484&view=rev
Log:
Use void() to create a void expression type

Modified:
    libcxx/trunk/include/compare

Modified: libcxx/trunk/include/compare
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/compare?rev=329484&r1=329483&r2=329484&view=diff
==============================================================================
--- libcxx/trunk/include/compare (original)
+++ libcxx/trunk/include/compare Fri Apr  6 21:28:11 2018
@@ -639,7 +639,7 @@ constexpr auto __get_comp_type() {
   constexpr _CCC _Cat = sizeof...(_Ts) == 0 ? _StrongOrd
       : __compute_comp_type(__type_kinds);
   if constexpr (_Cat == _None)
-    return ((void)0);
+    return void();
   else if constexpr (_Cat == _WeakEq)
     return weak_equality::equivalent;
   else if constexpr (_Cat == _StrongEq)




More information about the cfe-commits mailing list