Skip to content

Commit f9ed86a

Browse files
committed
[libc++][NFC] Avoid most-vexing parse
1 parent 4dfa12a commit f9ed86a

File tree

1 file changed

+2
-2
lines changed
  • libcxx/test/std/strings/basic.string/string.ops/string_substr

1 file changed

+2
-2
lines changed

libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ TEST_CONSTEXPR_CXX20 bool test_alloc() {
126126
using string = std::basic_string<char, std::char_traits<char>, alloc>;
127127
test_allocator_statistics stats;
128128
{
129-
string str((alloc(&stats)));
129+
string str = string(alloc(&stats));
130130
stats = test_allocator_statistics();
131131
(void)str.substr();
132132
assert(stats.moved == 0);
133133
assert(stats.copied == 0);
134134
}
135135
{
136-
string str((alloc(&stats)));
136+
string str = string(alloc(&stats));
137137
stats = test_allocator_statistics();
138138
(void)std::move(str).substr();
139139
assert(stats.moved == 0);

0 commit comments

Comments
 (0)