Changeset 921174c in mainline


Ignore:
Timestamp:
2018-07-05T21:41:21Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3d6f7f3
Parents:
5af0bc9
git-author:
Dzejrou <dzejrou@…> (2018-04-22 15:46:16)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:21)
Message:

cpp: added swap for list, added stubs for the remaining list operations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/impl/list.hpp

    r5af0bc9 r921174c  
    980980            //       use a swapper that swaps list nodes)
    981981
     982            void merge(list& other)
     983            {
     984                // TODO: implement
     985            }
     986
     987            void merge(list&& other)
     988            {
     989                merge(other);
     990            }
     991
     992            template<class Compare>
     993            void merge(list& other, Compare comp)
     994            {
     995                // TODO: implement
     996            }
     997
     998            template<class Compare>
     999            void merge(list&& other, Compare comp)
     1000            {
     1001                merge(other, comp);
     1002            }
     1003
     1004            void reverse() noexcept
     1005            {
     1006                // TODO: implement
     1007            }
     1008
     1009            void sort()
     1010            {
     1011                // TODO: implement
     1012            }
     1013
     1014            template<class Compare>
     1015            void sort(Compare comp)
     1016            {
     1017                // TODO: implement
     1018            }
     1019
    9821020        private:
    9831021            allocator_type allocator_;
     
    10871125            }
    10881126    };
     1127
     1128    template<class T, class Allocator>
     1129    void swap(list<T, Allocator>& lhs, list<T, Allocator>& rhs)
     1130        noexcept(noexcept(lhs.swap(rhs)))
     1131    {
     1132        lhs.swap(rhs);
     1133    }
    10891134}
    10901135
Note: See TracChangeset for help on using the changeset viewer.