[llvm] r337576 - Change bool_constant to integral_constant.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 20 09:51:56 PDT 2018


Author: zturner
Date: Fri Jul 20 09:51:55 2018
New Revision: 337576

URL: http://llvm.org/viewvc/llvm-project?rev=337576&view=rev
Log:
Change bool_constant to integral_constant.

bool_constant is C++17.

Modified:
    llvm/trunk/include/llvm/ADT/STLExtras.h

Modified: llvm/trunk/include/llvm/ADT/STLExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/STLExtras.h?rev=337576&r1=337575&r2=337576&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/STLExtras.h (original)
+++ llvm/trunk/include/llvm/ADT/STLExtras.h Fri Jul 20 09:51:55 2018
@@ -61,7 +61,8 @@ using ValueOfRange = typename std::remov
 //     Extra additions to <type_traits>
 //===----------------------------------------------------------------------===//
 
-template <typename T> struct negation : std::bool_constant<!bool(T::value)> {};
+template <typename T>
+struct negation : std::integral_constant<bool, !bool(T::value)> {};
 
 template <typename...> struct conjunction : std::true_type {};
 template <typename B1> struct conjunction<B1> : B1 {};




More information about the llvm-commits mailing list