Skip to content

Commit

Permalink
Revert D62076629: fix literal_string under gcc
Browse files Browse the repository at this point in the history
Differential Revision:
D62076629

Original commit changeset: fd0ecf1e6962

Original Phabricator Diff: D62076629

fbshipit-source-id: 74875729a22d051baef972bf686f6b29878d9d91
  • Loading branch information
Gautham Kovvuru authored and facebook-github-bot committed Sep 3, 2024
1 parent 64a23d6 commit f9aa290
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,6 @@ if (BUILD_TESTS OR BUILD_BENCHMARKS)
TEST unit_test SOURCES UnitTest.cpp
BENCHMARK uri_benchmark SOURCES UriBenchmark.cpp
TEST uri_test SOURCES UriTest.cpp
TEST utility_test SOURCES UtilityTest.cpp
TEST varint_test SOURCES VarintTest.cpp

DIRECTORY testing/test/
Expand Down
2 changes: 1 addition & 1 deletion folly/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ inline constexpr identity_fn identity{};
/// }
template <typename C, std::size_t N>
struct literal_string {
C buffer[N] = {};
C buffer[N];

FOLLY_CONSTEVAL /* implicit */ literal_string(C const (&buf)[N]) noexcept {
for (std::size_t i = 0; i < N; ++i) {
Expand Down
2 changes: 0 additions & 2 deletions folly/test/UtilityTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ TEST_F(UtilityTest, forward_like) {
// folly::forward_like<const int&>(1);
}

static_assert(!std::is_default_constructible_v<folly::literal_string<char, 1>>);

TEST_F(UtilityTest, literal_string) {
constexpr auto s = folly::literal_string{"hello world"};
EXPECT_STREQ("hello world", s.c_str());
Expand Down

0 comments on commit f9aa290

Please sign in to comment.