Commit graph

488 commits

Author SHA1 Message Date
MetaLang
14b6a4b25f Partially done new unit tests for outputting to OutputRanges 2014-03-24 23:43:11 -03:00
MetaLang
9300935693 Fix small typo that was causing a compile error, redo comments 2014-03-24 22:57:46 -03:00
MetaLang
4d33f11640 Small formatting fix 2014-03-24 22:19:19 -03:00
MetaLang
c64d366d6a Revamp to allow tee to take either an OutputRange or a lambda to output to 2014-03-24 22:17:33 -03:00
Andrei Alexandrescu
b9ff961d1d Added the text of the failing unittest 2014-03-23 00:49:41 -07:00
Andrei Alexandrescu
f364c390e8 rebased, fixed conflict 2014-03-23 00:49:41 -07:00
Andrei Alexandrescu
bb2ab1bebd review 2014-03-23 00:49:41 -07:00
Andrei Alexandrescu
67b5ffc2ff Improved error messages 2014-03-23 00:49:41 -07:00
Andrei Alexandrescu
6095350e2a Fix Issue 9616 - SortedRange should support all range kinds 2014-03-23 00:49:41 -07:00
Andrei Alexandrescu
6df2098064 Improved error messages 2014-03-23 00:49:41 -07:00
Andrei Alexandrescu
8366c67d9e Fix Issue 9616 - SortedRange should support all range kinds 2014-03-23 00:49:41 -07:00
Infiltrator
3fe27f4cd1 Update range.d 2014-03-20 12:41:21 +11:00
Infiltrator
ee2d46263b Issue 5870 - Debug code in SortedRange assumes it can always print the range 2014-03-20 11:32:51 +11:00
MetaLang
8eabb58fd8 Remove forwarding of save and remove unittests for save functionality 2014-03-18 20:08:53 -03:00
Per Nordlöw
d701f90275 Issue 3882: Use cast(void) instead of value capture 2014-03-18 23:50:18 +01:00
MetaLang
d882fb44e9 Merge branch 'master' into std-range-tee-fixup 2014-03-18 18:57:39 -03:00
monarch dodra
44371f8c8c Tweak Zip implementation 2014-03-18 20:32:57 +01:00
Andrej Mitrovic
9e9c2f6cef Merge pull request #1972 from monarchdodra/12007-3
Fixup Repeat condition
2014-03-13 20:48:29 +01:00
monarchdodra
468d57e328 Add missing imports 2014-03-12 07:40:44 +01:00
MetaLang
c1f6fc9656 Removed type parameter on Result struct 2014-03-10 22:01:06 -03:00
Per Nordlöw
275db682a5 Issue 3882: Explicitly capture return values for strictly pure functions returning non-void 2014-03-09 18:55:07 +01:00
monarchdodra
7e52bfdb9b Fixup Repeat condition 2014-02-27 18:42:42 +01:00
MetaLang
259dd0c07b Documentation tweaks 2014-02-26 19:29:31 -04:00
MetaLang
ec828b6ec9 Remove unnecessary check for static length on input range 2014-02-26 19:24:14 -04:00
Dmitry Olshansky
98d4c60840 Merge pull request #1895 from monarchdodra/12007
Fix issue 12007 - cartesianProduct does'nt work with ranges of immutable...
2014-02-27 00:31:30 +03:00
monarchdodra
189d64433f Simplify Zip's constructor 2014-02-26 21:18:59 +01:00
monarchdodra
301b42f0de Fix issue 12007 - cartesianProduct does'nt work with ranges of immutables
https://d.puremagic.com/issues/show_bug.cgi?id=12007

This makes a tweak to `Zip`'s `save`: Now, it *builds* a new `Zip` object
from the saved ranges, rather than assigning each range individually.

This gives 2 advantages:
1. Better support for `save` (which doesn't actaully guarantee assignability)
2. Avoids useless `opAssign` overhead
2014-02-26 21:18:59 +01:00
MetaLang
18483b3ec4 Actually define IndexType, change opDollar to alias length, not _input.length 2014-02-25 20:45:18 -04:00
MetaLang
71250414cf Forward random access if the underlying range has it AND pipeOnPop is false 2014-02-25 20:07:15 -04:00
MetaLang
28a6ce4678 Change documentation and unittests to make it clear that the function passed to tee is not executed until the resultant range is evaluated. 2014-02-25 19:12:18 -04:00
MetaLang
79d5d6034e Change unittests to use UFCS 2014-02-25 18:51:15 -04:00
MetaLang
52edb27719 Tabs to spaces 2014-02-25 18:41:21 -04:00
MetaLang
1cebf18fe3 Change documentation to reflect pipeOnPop, fix unittest failure. 2014-02-25 00:25:45 -04:00
MetaLang
8bdb382fbf Forward back, popBack, and length if available. If _input.length is available statically, make it available statically in the result as well. Change pipeOnFront back to pipeOnPop because _input may have back and popBack. 2014-02-24 23:29:19 -04:00
MetaLang
512edcaec2 Updated documentation to say that tee is useful for debugging long UFCS chains, and that the default behaviour is to call func on popFront 2014-02-24 21:46:34 -04:00
irritate
45c4e51982 Revive #1348: "Issue 9882 - Implement a "tee" style InputRange so that a function can be called during a chain of InputRanges." 2014-02-24 20:57:56 -04:00
monarch dodra
b770bddcaf Merge pull request #1950 from AndrejMitrovic/Fixup1835
Issue 12177 (regression) -  inout(Cycle!(string[2])) implicit cast problem
2014-02-18 07:59:33 +01:00
Daniel Murphy
4d0892baba Remove uses of the comma operator 2014-02-18 00:48:40 +11:00
Andrej Mitrovic
025c133e34 Introduce a cast as a workaround for missing inout constructors. 2014-02-17 11:10:14 +01:00
Andrej Mitrovic
8892490584 Use 4 spaces, not 3 for indentation. 2014-02-17 11:06:57 +01:00
monarchdodra
1cc6c6a142 Fix issue 12007 - cartesianProduct does'nt work with ranges of immutables
The fix consists in making Repeat!T assignable, even if T itself is not.
2014-02-12 09:57:13 +01:00
k-hara
6f43a92cd2 Fix predicate template implementations in std.traits and std.range
Use T.init property instead of void initializer, because it will work even if T is const or immutable type.

I must change a part of unit test for the bug 6935, because we cannot support ranges which overrides init property.
2014-02-11 18:36:37 +09:00
k-hara
b391b2ec9f Convert to new alias syntax 2014-02-11 15:27:05 +09:00
Marc Schütz
e4ce099124 Change documentation to use the correct parameter name. 2014-02-08 12:07:07 +01:00
Robert burner Schadek
3890dc69c8 std.range doc changes: less example redundance and examples for function
without
2014-02-04 15:07:11 +01:00
monarchdodra
266357743a Tweak zip implementation
Made doc location consistent in regards to static ifs.
2014-02-01 16:51:05 +01:00
Hara Kenji
8e302d0114 Merge pull request #1851 from monarchdodra/cycleMod
Fixes in Cycle
2014-01-25 14:15:35 -08:00
Daniel Murphy
a656f26e9e Remove use of automatic adjacent string literal concatenation from phobos 2014-01-20 03:42:21 +11:00
monarchdodra
63535371bc Cycle unittests 2014-01-13 20:50:31 +01:00
monarchdodra
25f123687c Fix issue 10845 2014-01-13 20:50:31 +01:00