Changeset d9a9e7b in mainline for uspace/lib/cpp/include


Ignore:
Timestamp:
2018-07-05T21:41:24Z (7 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f2f85283
Parents:
71f713a
git-author:
Dzejrou <dzejrou@…> (2018-06-05 13:05:16)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:24)
Message:

cpp: added tests for mutating algorithms and fixed bugs found by them

Location:
uspace/lib/cpp/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/__bits/test/tests.hpp

    r71f713a rd9a9e7b  
    293293        private:
    294294            void test_non_modifying();
     295            void test_mutating();
    295296    };
    296297}
  • uspace/lib/cpp/include/impl/algorithm.hpp

    r71f713a rd9a9e7b  
    400400    {
    401401        while (first != last)
    402             *result++ = move(first++);
     402            *result++ = move(*first++);
    403403
    404404        return result;
     
    444444        while (first != last)
    445445            *result++ = op(*first++);
     446
     447        return result;
    446448    }
    447449
     
    454456        while (first1 != last1)
    455457            *result++ = op(*first1++, *first2++);
     458
     459        return result;
    456460    }
    457461
Note: See TracChangeset for help on using the changeset viewer.