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:
@@ -42,7 +42,7 @@ class my_input_iterator
|
||||
{
|
||||
It it_;
|
||||
|
||||
template <class U> friend class input_iterator;
|
||||
template <class U> friend class my_input_iterator;
|
||||
public:
|
||||
typedef my_input_iterator_tag iterator_category;
|
||||
typedef typename std::iterator_traits<It>::value_type value_type;
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
my_input_iterator() : it_() {}
|
||||
explicit my_input_iterator(It it) : it_(it) {}
|
||||
template <class U>
|
||||
my_input_iterator(const input_iterator<U>& u) :it_(u.it_) {}
|
||||
my_input_iterator(const my_input_iterator<U>& u) :it_(u.it_) {}
|
||||
|
||||
reference operator*() const {return *it_;}
|
||||
pointer operator->() const {return it_;}
|
||||
|
||||
Reference in New Issue
Block a user