projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a0c9d0
)
Use a constexpr char* under MSVC for the constexpr StringPiece test
author
Christopher Dykes
<cdykes@fb.com>
Mon, 22 Aug 2016 21:15:39 +0000
(14:15 -0700)
committer
Facebook Github Bot 4
<facebook-github-bot-4-bot@fb.com>
Mon, 22 Aug 2016 21:23:30 +0000
(14:23 -0700)
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
patch
|
blob
|
history
diff --git
a/folly/test/RangeTest.cpp
b/folly/test/RangeTest.cpp
index 294659c90d621ad7e5775cf5f459164b1e55aff8..0a1d03ace08a1b1b8b3270c1f59115c1fdd1b7e3 100644
(file)
--- 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 c
har helloArray[]
= "hello";
+constexpr c
onst char* helloArray
= "hello";
TEST(StringPiece, Constexpr) {
constexpr StringPiece hello1("hello");