We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dfa12a commit f9ed86aCopy full SHA for f9ed86a
libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
@@ -126,14 +126,14 @@ TEST_CONSTEXPR_CXX20 bool test_alloc() {
126
using string = std::basic_string<char, std::char_traits<char>, alloc>;
127
test_allocator_statistics stats;
128
{
129
- string str((alloc(&stats)));
+ string str = string(alloc(&stats));
130
stats = test_allocator_statistics();
131
(void)str.substr();
132
assert(stats.moved == 0);
133
assert(stats.copied == 0);
134
}
135
136
137
138
(void)std::move(str).substr();
139
0 commit comments