[libc-commits] [libc] 89e5c20 - [libc][NFC] Mark a constructor of StringView to be constexpr.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Mon Aug 1 00:14:53 PDT 2022
Author: Siva Chandra Reddy
Date: 2022-08-01T07:13:20Z
New Revision: 89e5c20ca97838bf8efbb8c0e114dda1b8037b7d
URL: https://github.com/llvm/llvm-project/commit/89e5c20ca97838bf8efbb8c0e114dda1b8037b7d
DIFF: https://github.com/llvm/llvm-project/commit/89e5c20ca97838bf8efbb8c0e114dda1b8037b7d.diff
LOG: [libc][NFC] Mark a constructor of StringView to be constexpr.
Added:
Modified:
libc/src/__support/CPP/StringView.h
Removed:
################################################################################
diff --git a/libc/src/__support/CPP/StringView.h b/libc/src/__support/CPP/StringView.h
index a82cec4a56e6..2969bc7cca18 100644
--- a/libc/src/__support/CPP/StringView.h
+++ b/libc/src/__support/CPP/StringView.h
@@ -56,7 +56,7 @@ class StringView {
// Ctor for raw literal.
template <size_t N>
- StringView(const char (&Str)[N]) : StringView(Str, N - 1) {}
+ constexpr StringView(const char (&Str)[N]) : StringView(Str, N - 1) {}
constexpr const char *data() const { return Data; }
More information about the libc-commits
mailing list