[ADT] Clarify llvm::bit_cast implementation comment
authorJoe Loser <joeloser@fastmail.com>
Sun, 21 Aug 2022 16:41:13 +0000 (10:41 -0600)
committerJoe Loser <joeloser@fastmail.com>
Mon, 22 Aug 2022 00:13:41 +0000 (18:13 -0600)
When reviewing https://reviews.llvm.org/D132330, I noticed a few pre-existing
comments regarding the implementation of `llvm::bit_cast`. One comment is a bit
misleading since `std::bit_cast` is a C++20 standard library thing, not a
C++17 one (otherwise we could use it directly). Clarify that in the comment.

Differential Revision: https://reviews.llvm.org/D132332

llvm/include/llvm/ADT/bit.h

index 4a1bcfb..8e280db 100644 (file)
@@ -19,7 +19,7 @@
 
 namespace llvm {
 
-// This implementation of bit_cast is different from the C++17 one in two ways:
+// This implementation of bit_cast is different from the C++20 one in two ways:
 //  - It isn't constexpr because that requires compiler support.
 //  - It requires trivially-constructible To, to avoid UB in the implementation.
 template <