From 285da1c8cdb2e903372f8f3e3b79eb4d0bac7437 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 14 Nov 2022 00:31:06 -0800 Subject: [PATCH] [llvm] Use std::is_integral_v (NFC) --- llvm/include/llvm/ADT/MapVector.h | 2 +- llvm/include/llvm/Support/BinaryStreamReader.h | 2 +- llvm/include/llvm/Support/BinaryStreamWriter.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/ADT/MapVector.h b/llvm/include/llvm/ADT/MapVector.h index c4e5c7e..27232c2 100644 --- a/llvm/include/llvm/ADT/MapVector.h +++ b/llvm/include/llvm/ADT/MapVector.h @@ -39,7 +39,7 @@ class MapVector { VectorType Vector; static_assert( - std::is_integral::value, + std::is_integral_v, "The mapped_type of the specified Map must be an integral type"); public: diff --git a/llvm/include/llvm/Support/BinaryStreamReader.h b/llvm/include/llvm/Support/BinaryStreamReader.h index 6853df3..056d2a5 100644 --- a/llvm/include/llvm/Support/BinaryStreamReader.h +++ b/llvm/include/llvm/Support/BinaryStreamReader.h @@ -66,7 +66,7 @@ public: /// \returns a success error code if the data was successfully read, otherwise /// returns an appropriate error code. template Error readInteger(T &Dest) { - static_assert(std::is_integral::value, + static_assert(std::is_integral_v, "Cannot call readInteger with non-integral value!"); ArrayRef Bytes; diff --git a/llvm/include/llvm/Support/BinaryStreamWriter.h b/llvm/include/llvm/Support/BinaryStreamWriter.h index ce7af36..d3d5edb 100644 --- a/llvm/include/llvm/Support/BinaryStreamWriter.h +++ b/llvm/include/llvm/Support/BinaryStreamWriter.h @@ -56,7 +56,7 @@ public: /// \returns a success error code if the data was successfully written, /// otherwise returns an appropriate error code. template Error writeInteger(T Value) { - static_assert(std::is_integral::value, + static_assert(std::is_integral_v, "Cannot call writeInteger with non-integral value!"); uint8_t Buffer[sizeof(T)]; llvm::support::endian::write( -- 2.7.4