From 07c7cdeebc61e9640d4b94d28eca6879c471bbdc Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Mon, 22 Aug 2016 14:15:39 -0700 Subject: [PATCH] Use a constexpr char* under MSVC for the constexpr StringPiece test Summary: MSVC can't handle the array as a constexpr value, but works fine with the char*. Reviewed By: yfeldblum Differential Revision: D3705189 fbshipit-source-id: e8208b3f2831a720095641f0e1e72ac63ed845a0 --- folly/test/RangeTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/test/RangeTest.cpp b/folly/test/RangeTest.cpp index 294659c9..0a1d03ac 100644 --- a/folly/test/RangeTest.cpp +++ b/folly/test/RangeTest.cpp @@ -293,7 +293,7 @@ TEST(StringPiece, InvalidRange) { EXPECT_THROW(a.subpiece(6), std::out_of_range); } -constexpr char helloArray[] = "hello"; +constexpr const char* helloArray = "hello"; TEST(StringPiece, Constexpr) { constexpr StringPiece hello1("hello"); -- 2.34.1