Commit Graph

87 Commits (9677274b3fe992ae39a36b3fd12dfd667ac0b5fc)

Author SHA1 Message Date
Daniel Kolesa 9677274b3f each -> iter 2015-06-26 21:01:16 +01:00
Daniel Kolesa 3a1ea741f1 do not move-on-return in order to allow copy elision 2015-06-25 18:59:26 +01:00
Daniel Kolesa ddb18b9d0d relax RangeHalf copy constructor a little (allow convertible range types) 2015-06-25 01:07:11 +01:00
Daniel Kolesa dbb266b5bd disallow range half trait checks 2015-06-24 20:03:23 +01:00
Daniel Kolesa 4c2376ea2d no need for distance_front either 2015-06-21 22:47:17 +01:00
Daniel Kolesa 6f2ab37b55 no need to implement push_front_n on TakeRange 2015-06-21 22:46:29 +01:00
Daniel Kolesa 154b1c7588 operator+ and operator- should be const 2015-06-21 22:29:17 +01:00
Daniel Kolesa dafd5a17b5 loosen up PointerRange ctor rules (allow construction of PointerRange<T> from any PointerRange<U> where U * is convertible to T *) 2015-06-17 00:44:53 +01:00
Daniel Kolesa dc58d09388 make allocator based containers more predictable + simplified PointerRange 2015-06-17 00:15:44 +01:00
Daniel Kolesa 7cdac42c4a sfinae friendly range traits + IsInputRange etc now works on arbitrary non-range types 2015-06-15 18:54:00 +01:00
Daniel Kolesa c287d7e98a push_front is only necessary on bidir ranges or better now 2015-06-14 04:53:38 +01:00
Daniel Kolesa 79774efbe6 more generalized PointerRange (but only optionally) 2015-06-11 00:41:41 +01:00
Daniel Kolesa 59c896e34f remove unnecessary arg 2015-06-10 01:18:56 +01:00
Daniel Kolesa e8114feaf0 the traits are actually not necessary 2015-06-10 00:59:39 +01:00
Daniel Kolesa 905d9e8d3c actually get rid of the reach() stuff, introduce new Reverse and Movable range traits and rename range.reach() to range.reverse() 2015-06-10 00:57:46 +01:00
Daniel Kolesa f9adf08ef9 turn make_move_range into .movable() on any range, and make_half_range(h1, h2) into h1.each(h2) 2015-06-10 00:13:20 +01:00
Daniel Kolesa ae68f1f379 octa::ceach,reach,creach 2015-06-09 21:18:43 +01:00
Daniel Kolesa 1553e2d30f add StringRange (provides hashing and proper ToString), make it the range for String, add extra ptr-ctor for Vector and new ctors for String, optimizations 2015-06-09 19:02:44 +01:00
Daniel Kolesa ea42a5e841 use new type aliases + refactoring + namespacing 2015-06-08 21:20:12 +01:00
Daniel Kolesa 6eae6487c4 replace usages of typedef with "using" 2015-06-08 00:55:08 +01:00
Daniel Kolesa 84d78ba87a deuglify template args 2015-06-04 22:57:06 +01:00
Daniel Kolesa 710fa1addc deuglify range.h 2015-06-03 23:55:11 +01:00
Daniel Kolesa ff90009450 get rid of stupid Type suffixes (we already know it's a type from the name) 2015-06-03 20:00:41 +01:00
Daniel Kolesa bfc94e31d7 uglify the code by using unique identifiers only (prevent macro conflicts) 2015-06-02 00:57:34 +01:00
Daniel Kolesa 8bfd38f2e6 remove unused vars 2015-06-01 02:39:19 +01:00
Daniel Kolesa 67600c4637 first -> front, last -> back 2015-06-01 01:13:37 +01:00
Daniel Kolesa ca5d80189a RangeOf template to get a range for the given type 2015-06-01 00:33:59 +01:00
Daniel Kolesa 51b210e1d6 cleanups 2015-05-30 01:46:50 +01:00
Daniel Kolesa 9f37057e51 cleanups 2015-05-30 01:09:13 +01:00
Daniel Kolesa cb1bf48aaa allow range traits to work on halves 2015-05-29 23:48:05 +01:00
Daniel Kolesa 3c6ef6e593 initial support for "range halves" ("range iterator") 2015-05-29 23:32:25 +01:00
Daniel Kolesa 15507e0143 remove useless equality/inequality operators on ranges 2015-05-29 21:49:07 +01:00
Daniel Kolesa a54db37a9c get const right on ranges 2015-05-29 20:21:35 +01:00
Daniel Kolesa 26f83b9efb pop_first() and pop_last() now return bool instead of void (true if popped, false if not) 2015-05-29 20:02:40 +01:00
Daniel Kolesa 38fc61481a initial support for "range extension" - i.e. push_first and push_last methods (+ push_first_n, push_last_n) 2015-05-29 19:52:20 +01:00
Daniel Kolesa 2f035f44ce simplify PointerRange more 2015-05-29 00:30:27 +01:00
Daniel Kolesa f96764fad0 simplify PointerRange 2015-05-29 00:01:24 +01:00
Daniel Kolesa a49716034e begin to_string infra 2015-05-28 02:38:52 +01:00
Daniel Kolesa 1371a32db7 use size() instead of length() 2015-05-27 23:19:16 +01:00
Daniel Kolesa 07881f2a4f octa::chunks 2015-05-27 20:56:44 +01:00
Daniel Kolesa d2f48ea0a5 octa::take 2015-05-27 20:45:34 +01:00
Daniel Kolesa 029575d4a6 add octa::each 2015-05-26 19:25:20 +01:00
Daniel Kolesa fe6325d5e3 check for input range before checking for put() - avoid potential false positives 2015-05-23 22:27:57 +01:00
Daniel Kolesa 329aefdecd IsOutputRange will now test for presence of the right 'put' method, enabling IsOutputRange tests on hybrid ranges (i.e. input ranges that satisfy output requirements) 2015-05-23 22:24:12 +01:00
Daniel Kolesa 7589a93539 add some traits to check range for range types including proper type inheritance 2015-05-23 20:33:08 +01:00
Daniel Kolesa 8908ac0506 new range category: FiniteRandomAccessRange 2015-05-23 20:00:03 +01:00
Daniel Kolesa b90fce8d84 Revert "add range difference type"
This reverts commit 4adbeb4e1b.
2015-05-23 17:56:08 +01:00
Daniel Kolesa 4adbeb4e1b add range difference type 2015-05-23 17:40:36 +01:00
Daniel Kolesa 9c3486903d add optional pop_first_n and pop_last_n methods on ranges 2015-05-23 17:36:26 +01:00
Daniel Kolesa 64810e4006 remove the noexcept stuff; nothing in octastd ever throws 2015-05-20 22:05:41 +01:00