summaryrefslogtreecommitdiff
path: root/absl/strings/string_view_test.cc
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2019-07-30 20:47:29 -0700
committerGravatar Andy Soffer <asoffer@google.com>2019-07-31 16:07:55 -0400
commit14550beb3b7b97195e483fb74b5efb906395c31e (patch)
tree2b7a9947d0aee3704bc58587e85f63492bbe12f3 /absl/strings/string_view_test.cc
parent52e88ee56b72cf32bc66534d942c7398ce481331 (diff)
Export of internal Abseil changes.
-- 8f685654a7d04eb8a0cb82d31e44e391e906b609 by Derek Mauro <dmauro@google.com>: Support constexpr construction of absl::string_view from a string literal in MSVC 2017+. Fixes https://github.com/abseil/abseil-cpp/issues/352 PiperOrigin-RevId: 260853160 -- a3c4c5168ce2a491134d7c87cf7fdc75d1ee2533 by Derek Mauro <dmauro@google.com>: Make SwissTable's at() throw when exceptions are enabled Fixes https://github.com/abseil/abseil-cpp/issues/355 PiperOrigin-RevId: 260788026 GitOrigin-RevId: 8f685654a7d04eb8a0cb82d31e44e391e906b609 Change-Id: I9ed498e181faa9c9d16e9b1b01404969d99b8ea9
Diffstat (limited to 'absl/strings/string_view_test.cc')
-rw-r--r--absl/strings/string_view_test.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/strings/string_view_test.cc b/absl/strings/string_view_test.cc
index 823d8ed4..2380e1a3 100644
--- a/absl/strings/string_view_test.cc
+++ b/absl/strings/string_view_test.cc
@@ -941,6 +941,11 @@ TEST(StringViewTest, ConstexprCompiles) {
#error GCC/clang should have constexpr string_view.
#endif
+// MSVC 2017+ should be able to construct a constexpr string_view from a cstr.
+#if defined(_MSC_VER) && _MSC_VER >= 1910
+#define ABSL_HAVE_CONSTEXPR_STRING_VIEW_FROM_CSTR 1
+#endif
+
#endif // ABSL_HAVE_STD_STRING_VIEW
#ifdef ABSL_HAVE_CONSTEXPR_STRING_VIEW_FROM_CSTR