Commit graph

347 commits

Author SHA1 Message Date
Denis Shelomovskij
3b84e18bc8 Reformat std.range.put book table
Empty lines aren't allowed in `BOOKTABLE` macro as it results in inserting a "break" into a table.
2012-11-14 18:35:42 +04:00
Denis Shelomovskij
4abe76af39 Stay before 80 characters in reformatted std.range book table
Reformatted by @monarchdodra.
2012-11-14 18:35:01 +04:00
Denis Shelomovskij
51d48abb01 Add inout support to std.range.{hasMobileElements,lengthType} 2012-11-14 17:44:18 +04:00
Denis Shelomovskij
db1d909d7a Remove redundant dummy arguments for inout support names. 2012-11-14 15:28:50 +04:00
Denis Shelomovskij
222a938adf Fix std.range.isRandomAccessRange: is(typeof(r[1]) == typeof(r.front)) is also required. 2012-11-14 15:17:05 +04:00
Denis Shelomovskij
f767461a2d Refactor std.range.put: flatter static ifs. 2012-11-14 15:05:44 +04:00
Denis Shelomovskij
d6d438b024 Refactor std.range.put: use simpler (E[]).init instead of (&e)[0..1] hack in static ifs. 2012-11-14 14:36:30 +04:00
Denis Shelomovskij
6c3422a8aa Remove redundant checks from std.range.put static ifs 2012-11-14 14:29:26 +04:00
Denis Shelomovskij
a5ac871490 Reformat std.range book table
Empty lines aren't allowed in `BOOKTABLE` macro as it results in inserting a "break" into a table.
2012-11-14 13:03:24 +04:00
Peter Alexander
a00c3c825c Fix bug 8900 - Zip with infinite range fails.
`std.range.Zip` contains a `Tuple`, whose `toString()` function calls `formatElement` which eventually calls this function, leading to a static call to `walkLength` on infinite ranges. Since pul request 880, `walkLength` doesn't work with infinite ranges, so it fails to compile.

This change ensures that `walkLength` is called with only valid range types.

Bug: http://d.puremagic.com/issues/show_bug.cgi?id=8900
2012-10-27 12:02:56 +01:00
Alex Rønne Petersen
a4856a70cc Merge pull request #880 from monarchdodra/walkLength
Update walkLength impl; better support for inf.
2012-10-19 02:29:19 -07:00
monarch dodra
eb7b01eaba Update std/range.d 2012-10-19 09:27:02 +03:00
monarch dodra
6efa0268f4 Update walkLength doc and impl; support for inf. 2012-10-19 07:33:19 +02:00
jmdavis
3d92608c47 Added more deprecation messages. 2012-10-15 21:40:36 -07:00
monarch dodra
df798d4356 save consolidation 2012-10-14 12:19:10 +02:00
Brad Roberts
c07bce765c Merge pull request #821 from AndrejMitrovic/patch-2
Fix Issue 8676
2012-10-04 10:43:38 -07:00
Andrei Alexandrescu
04acd3f07e Merge pull request #829 from monarchdodra/popN
Tweak in /pop(Front|Back)N/
2012-10-03 21:23:42 -07:00
monarch dodra
2c7747ce56 Tweak in /pop(Front|Back)/ 2012-10-03 08:18:31 +02:00
monarch dodra
1ed21ed00b Tighter type checking for SortedRange 2012-10-02 19:51:33 +03:00
Andrej Mitrovic
619e6e7a16 Fix Issue 8676 (2)
lockstep's stopping policy default value isn't documented because it's set inside the function definition. Once Issue 8687 (http://d.puremagic.com/issues/show_bug.cgi?id=8687) is fixed we'll be able to set the default value in the function header.
2012-09-29 18:46:01 +03:00
monarch dodra
67a1bd7016 Tweaks in Take
Avoids useless runtime checks for when dealing with infinite ranges.
2012-09-26 20:52:10 +02:00
Andrei Alexandrescu
1b645ba717 Merge pull request #748 from RommelVR/master
Added std.range.Sequence slicing (Issue 7896)
2012-09-16 19:17:27 -07:00
Daniel Cousens
74929477ab Changed static slicing to relative slicing. 2012-09-05 19:47:04 +10:00
Nick Treleaven
d0643925cd Add input range-related links, fix a/an typo 2012-08-30 14:23:34 +01:00
Nick Treleaven
966fb99d4f Fix InputRange example
useRange must take an InputRange!int, not just InputRange.
Remove UsesRanges class - it's clearer just to use a free function.
2012-08-30 14:04:01 +01:00
monarchdodra
0dced45e5f Documenting return of pop[Front|back]N 2012-08-25 18:13:55 +02:00
Daniel Cousens
cf18f2823d Added unittest to show relative slicing behaviour more clearly. 2012-08-20 22:38:36 +10:00
Daniel Cousens
696256c76b Shortened unittest to use drop() instead of sequential popFront 2012-08-20 22:28:38 +10:00
Daniel Cousens
c9ad0e9819 Changed take() to takeExactly()
As Sequence is an infinite range, it's guaranteed that there will be more than the number of elements requested, so takeExactly will work just fine, and it has the advantage of having length.
2012-08-15 22:11:32 +10:00
Daniel Cousens
f30dc0d44a Switched from ulong to size_t (failing tests) 2012-08-13 21:45:20 +10:00
Daniel Cousens
475d6e12eb Removed const from Sequence.opSlice()
Also fixed stylistic issues.
2012-08-13 20:51:18 +10:00
Daniel Cousens
d9e1a501ec Added std.range.Sequence slicing (Issue 7896)
See http://d.puremagic.com/issues/show_bug.cgi?id=7896 for more information.
2012-08-12 22:42:28 +10:00
jmdavis
46c8498fc5 Added new overload for takeNone which can sometimes return the original type. 2012-08-05 19:25:33 -07:00
k-hara
4c4c35c922 Revert "Merge pull request #707 from eco/real-lambdas"
Because of the auto-tester breaking.

This reverts commit d5319fcfb6, reversing
changes made to 5313288dd1.
2012-07-23 14:25:38 +09:00
Andrei Alexandrescu
d5319fcfb6 Merge pull request #707 from eco/real-lambdas
Switch std.algorithm/.range to lambda syntax
2012-07-22 21:10:12 -07:00
Andrei Alexandrescu
812077114c Merge pull request #686 from jmdavis/cycle
Make Cycle const-correct.
2012-07-22 20:12:41 -07:00
Brad Anderson
32eb03a983 Switch std.algorithm/.range to lambda syntax
String lambdas are, of course, still supported.
2012-07-21 13:50:26 -06:00
jmdavis
735c2adbda Changes required for issue# 6277. 2012-07-21 01:57:28 -07:00
jmdavis
b574aa170c Make Cycle const-correct.
I also had to make the dummy range stuff const-correct (since it's used
to test Cycle). I cleaned up Cycle's documentation as well.
2012-07-13 00:05:26 -07:00
jmdavis
28781bfb9f Old deprecations which were not properly taken care of previously. 2012-07-07 02:03:49 -07:00
jmdavis
39c694c403 Fix some version(D_Ddoc) blocks so that they're version(StdDdoc). 2012-07-06 22:00:47 -07:00
Jens K. Mueller
3c2cbf02dd Fix wrong enforce in Zip's member popBack() 2012-07-02 14:27:48 +02:00
Jonathan M Davis
142051a12a Merge pull request #626 from jkm/master
Fix issue 7948
2012-07-01 18:27:07 -07:00
Jens K. Mueller
880edd1e6e Refactor to float literals with ending 0 2012-07-01 19:10:03 +02:00
jmdavis
b4a795073c Updates to changelog. 2012-06-20 20:54:49 -07:00
jmdavis
a885cf85ff Added RefRange to std.range.
It's a wrapper which effectively allows you to pass a range by
reference.
2012-06-20 20:44:02 -07:00
Jens K. Mueller
61012d929e Fix issue 7948 2012-06-11 23:16:05 +02:00
jmdavis
55666e778c Added additional unit tests for 7937. 2012-06-04 23:20:15 -07:00
jmdavis
105e3600ce Additional tweaks for 7937.
I didn't notice that iota had overloads. They've now been taken care of
as well.
2012-06-04 03:23:50 -07:00
jmdavis
5ca9dd0fd9 Fix for issue# 7937. 2012-06-04 02:10:40 -07:00