mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 12:02:36 +08:00
Mark LWG 2716 as complete - shuffle and sample disallows lvalue URNGs.
Libc++'s implementation of shuffle and sample already support lvalue and rvalue RNG's. This patch adds tests for both categories and marks the issue as complete. This patch also contains drive-by change for std::experimental::sample which improves the diagnostics produced when the correct iterator categories are not supplied. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,7 +29,7 @@ int main()
|
||||
std::shuffle(ia, ia+sa, g);
|
||||
LIBCPP_ASSERT(std::equal(ia, ia+sa, ia1));
|
||||
assert(std::is_permutation(ia, ia+sa, ia1));
|
||||
std::shuffle(ia, ia+sa, g);
|
||||
std::shuffle(ia, ia+sa, std::move(g));
|
||||
LIBCPP_ASSERT(std::equal(ia, ia+sa, ia2));
|
||||
assert(std::is_permutation(ia, ia+sa, ia2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user