Add tests specifically for LWG2164. We already did this; but now we have tests. NFC

llvm-svn: 359458
This commit is contained in:
Marshall Clow 2019-04-29 15:38:07 +00:00
parent 2c0d5043a7
commit 8a02f8d928
3 changed files with 24 additions and 1 deletions

View File

@ -145,5 +145,16 @@ int main(int, char**)
assert(is_contiguous_container_asan_correct(c));
}
{ // LWG 2164
int arr[] = {0, 1, 2, 3, 4};
int sz = 5;
std::vector<int> c(arr, arr+sz);
while (c.size() < c.capacity())
c.push_back(sz++);
c.emplace_back(c.front());
assert(c.back() == 0);
for (int i = 0; i < sz; ++i)
assert(c[i] == i);
}
return 0;
}

View File

@ -38,5 +38,17 @@ int main(int, char**)
}
#endif
{ // LWG 526
int arr[] = {0, 1, 2, 3, 4};
int sz = 5;
std::vector<int> c(arr, arr+sz);
while (c.size() < c.capacity())
c.push_back(sz++);
c.push_back(c.front());
assert(c.back() == 0);
for (int i = 0; i < sz; ++i)
assert(c[i] == i);
}
return 0;
}

View File

@ -216,7 +216,7 @@
<tr><td><a href="https://wg21.link/LWG3024">3024</a></td><td>variant's copies must be deleted instead of disabled via SFINAE</td><td>Albuquerque</td><td></td></tr>
<tr><td></td><td></td><td></td><td></td></tr>
<tr><td><a href="https://wg21.link/LWG2164">2164</a></td><td>What are the semantics of <tt>vector.emplace(vector.begin(), vector.back())</tt>?</td><td>Jacksonville</td><td></td></tr>
<tr><td><a href="https://wg21.link/LWG2164">2164</a></td><td>What are the semantics of <tt>vector.emplace(vector.begin(), vector.back())</tt>?</td><td>Jacksonville</td><td>Complete</td></tr>
<tr><td><a href="https://wg21.link/LWG2243">2243</a></td><td><tt>istream::putback</tt> problem</td><td>Jacksonville</td><td>Complete</td></tr>
<tr><td><a href="https://wg21.link/LWG2816">2816</a></td><td><tt>resize_file</tt> has impossible postcondition</td><td>Jacksonville</td><td><i>Nothing to do</i></td></tr>
<tr><td><a href="https://wg21.link/LWG2843">2843</a></td><td>Unclear behavior of <tt>std::pmr::memory_resource::do_allocate()</tt></td><td>Jacksonville</td><td>Complete</td></tr>