Skip to content

Commit

Permalink
F14MapTest.cpp: fix compilation fail
Browse files Browse the repository at this point in the history
The 'dest1' has been deduced to two parameters: std:pair<int, double>
and std::initializer_list, not an initializer_list of std::pair.

add an extra braces to pass compilation.
  • Loading branch information
xnhp0320 committed Aug 6, 2023
1 parent e9e2c3f commit a024af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folly/container/test/F14MapTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,7 @@ template <template <class...> class TMap>
void testInitializerListDeductionGuide() {
TMap<int, double> source({{1, 2.0}, {3, 4.0}});

TMap dest1{std::pair{1, 2.0}, {3, 4.0}};
TMap dest1{{std::pair{1, 2.0}, {3, 4.0}}};
static_assert(std::is_same_v<decltype(dest1), decltype(source)>);
EXPECT_EQ(dest1, source);

Expand Down

0 comments on commit a024af7

Please sign in to comment.