Commit 07c7cdee authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 4

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
parent 2a0c9d06
...@@ -293,7 +293,7 @@ TEST(StringPiece, InvalidRange) { ...@@ -293,7 +293,7 @@ TEST(StringPiece, InvalidRange) {
EXPECT_THROW(a.subpiece(6), std::out_of_range); EXPECT_THROW(a.subpiece(6), std::out_of_range);
} }
constexpr char helloArray[] = "hello"; constexpr const char* helloArray = "hello";
TEST(StringPiece, Constexpr) { TEST(StringPiece, Constexpr) {
constexpr StringPiece hello1("hello"); constexpr StringPiece hello1("hello");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment