Skip to content

Commit

Permalink
cv-qualifiers in array.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ifsmirnov committed Feb 25, 2017
1 parent 3ee2b90 commit 77897a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions array.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ class GenericArray : public ReprProxy<GenericArray<T>>, public std::vector<T> {
GenericArray<T> sorted() const;

template<typename Comp>
GenericArray<T>& sort(Comp&& comp) const;
GenericArray<T>& sort(Comp&& comp);
template<typename Comp>
GenericArray<T> sorted(Comp&& comp);
GenericArray<T> sorted(Comp&& comp) const;

GenericArray<T>& unique();
GenericArray<T> uniqued() const;
Expand Down Expand Up @@ -221,14 +221,14 @@ GenericArray<T> GenericArray<T>::sorted() const {

template<typename T>
template<typename Comp>
GenericArray<T>& GenericArray<T>::sort(Comp&& comp) const {
GenericArray<T>& GenericArray<T>::sort(Comp&& comp) {
std::sort(begin(), end(), comp);
return *this;
}

template<typename T>
template<typename Comp>
GenericArray<T> GenericArray<T>::sorted(Comp&& comp) {
GenericArray<T> GenericArray<T>::sorted(Comp&& comp) const {
auto res = *this;
res.sort(comp);
return res;
Expand Down

0 comments on commit 77897a5

Please sign in to comment.