diff options
Diffstat (limited to 'absl/strings/string_view_test.cc')
-rw-r--r-- | absl/strings/string_view_test.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/absl/strings/string_view_test.cc b/absl/strings/string_view_test.cc index 823d8ed4581d..2380e1a377a3 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 |