Andrei Alexandrescu
825ddd564f
Readded Filter unittests. Minor fix for move
2011-01-03 15:27:01 +00:00
Andrei Alexandrescu
c0ccf7fffe
Fix spurious message during compilation of Phobos
2010-12-29 13:34:45 +00:00
Andrei Alexandrescu
86a080f056
Fixed unlisted bug in readf
2010-12-24 03:05:42 +00:00
Andrei Alexandrescu
8975184044
Removed caching used inside map
2010-12-23 15:13:34 +00:00
Steven Schveighoffer
b24873fe7b
Fix issue where an assert requires the range to be printable (Which it may not be). This solves bugzilla 4901
2010-12-17 18:28:49 +00:00
Andrei Alexandrescu
4a189f8915
bugzilla 5257, including suggestion to default predicate to true
2010-11-25 22:50:55 +00:00
Shin Fujishiro
af1fb0b618
Constrain swap() with isMutable!T so that const objects should not be swapped. std.traits.isMutable is undocumented for now.
2010-11-18 21:45:18 +00:00
Shin Fujishiro
dcd1561de3
Made std.algorithm.swap "@trusted pure nothrow".
...
Also some minor fixes:
* Made parameter names consistent with ddoc: lhs and rhs.
* 'memcpy' only when T has a non-trivial assignment, i.e. when T defines postblit, destructor and/or opAssign.
* 3-space indent -> 4-space.
2010-11-18 21:26:11 +00:00
Shin Fujishiro
f748438020
Fixed bug 5054: Splitter example doesn't work.
2010-11-16 20:39:25 +00:00
David Simcha
8331c70969
More 64 fixes for semantic errors that only show up when templates are instantiated via unittests. Now I'm actually serious about Phobos passing semantic analysis, except for a few modules due to weird druntime issues.
2010-11-10 05:25:50 +00:00
David Simcha
5b123f9d18
64-bit fixes for Phobos2. All of std now passes semantic analysis on Linux with -m64.
2010-11-10 00:02:03 +00:00
Shin Fujishiro
258e0b6f1c
Fixed bug 5049: bringToFront() returns wrong value.
...
- Fixed the return value.
- Made bringToFront() handle stepping-over conditions correctly.
- Added undocumented SList.Range.sameHead for making the example code work.
2010-10-15 17:52:43 +00:00
Shin Fujishiro
3ec3fee75a
Ddoc: Fixed bug 4634 and some trivial doc isues in std.algorithm & range.
...
- Bug 4634: typo in levenshteinDistanceAndPath documentation
- Got rid of mentions of iterator-age begin(r)
- equal() not equals()
2010-10-13 05:40:03 +00:00
Shin Fujishiro
3c048ac456
Migration of tup.field[k] to tup[k].
...
Replaced ad-hoc 'is tuple?' checks with isTuple template.
The "this._cache" change in std.range is just a workaround for bug 5046.
2010-10-13 05:39:53 +00:00
Andrei Alexandrescu
61cc023db7
Removed slack filter() code; changed filter such that filter is curryable
2010-10-03 18:39:33 +00:00
Andrei Alexandrescu
6dded8e278
Added function balancedParens
2010-09-26 19:54:34 +00:00
Andrei Alexandrescu
f0b2af7f07
Added function balancedParens
2010-09-26 19:52:44 +00:00
David Simcha
b597d23f83
Bug 4888: Heavy reliance on Bug 3534 in Phobos range usage. I used a different approach here than the first one I tried. I only did what was necessary to make Phobos work instead of trying to fix the deeper issue of making std.algorithm to work w/ const/immutable arrays.
2010-09-18 21:00:52 +00:00
David Simcha
72d6bf1217
Add back lowerBound, upperBound, canFindSorted, equalRange to std.algorithm, but with "scheduled for deprecaton" pragmas on instantiation.
2010-09-15 23:02:23 +00:00
David Simcha
b1bb7afb36
Make sort work on sealed ranges that don't explicitly define moveFront() and friends as long as these are implicitly defined.
2010-09-13 22:57:12 +00:00
Shin Fujishiro
ac2b71d2e1
Fixed: std.algorithm.findAdjacent() returns non-empty range if no matching pair is found.
2010-09-08 21:48:06 +00:00
Andrei Alexandrescu
fcfb07ff9b
Improvements to find() and startsWith(), removed crap, added SortedRange, added debug=std_algorithm
2010-09-08 13:03:47 +00:00
David Simcha
76e5bfa517
Bug 4789: std.algorithm.sort bug
2010-09-03 03:51:54 +00:00
David Simcha
1725ddc8ed
std.algorithm.reduce() should throw on empty ranges and no explicit seed instead of silently returning bogus results.
2010-08-30 23:09:39 +00:00
David Simcha
f9e540579b
Make std.algorithm.reduce() work with opApply iteration.
2010-08-30 04:06:23 +00:00
Walter Bright
b8ce58ccd1
detab sources
2010-08-23 02:14:45 +00:00
Andrei Alexandrescu
3f2b8c12ea
64-bit compatibility work
2010-08-22 20:55:22 +00:00
David Simcha
d316980220
Bug 2903: Splitter should be bi-dir if the input range is bi-dir (Single-character separator version, since range separator version was fixed a long time ago. Excluded terminator version b/c it's not documented/officially part of Phobos yet and there are issues w/ including an empty range if the last character is the terminator that need to be resolved first.)
2010-08-18 04:06:26 +00:00
David Simcha
95122e68ab
Bug 4408: Ambiguity when using std.algorithm.splitter with generic ranges
2010-08-17 02:56:56 +00:00
David Simcha
49852ac686
save() for std.algorithm.
2010-08-15 03:50:54 +00:00
Lars T. Kyllingstad
4b90954691
Bug 3946: schwartzSort - SwapStrategy always unstable
2010-08-13 10:55:11 +00:00
David Simcha
98c0badf4a
Add unittests.
2010-08-11 22:23:46 +00:00
David Simcha
7ca87c26ac
Quick updates to std.algorithm: Unquals in a few places to work w/ const ranges, re-add save() to Filter.
2010-08-11 20:24:17 +00:00
Walter Bright
413c75336f
revert filter to old version
2010-08-11 02:48:23 +00:00
Walter Bright
d98807e043
add unittest for case that used to fail
2010-08-10 23:10:03 +00:00
Andrei Alexandrescu
86108199d6
Reformatted map, improved reduce, simplified find, and defined joiner.
2010-07-28 08:02:05 +00:00
Andrei Alexandrescu
80059a1c32
Optimization for fill; added uninitializedFill and initializeAll; changed copy to work with put(r, e) instead of r.put(e).
2010-07-09 03:47:03 +00:00
Andrei Alexandrescu
432e3fdfc8
Replaced std.contracts with std.exception throughout
2010-07-04 22:09:03 +00:00
Andrei Alexandrescu
3c95b5549f
Fixed fix for Map.save
2010-07-04 21:40:26 +00:00
Andrei Alexandrescu
4347cae9f5
Unlisted bug in Map.save and a few stylistic changes
2010-07-04 21:04:48 +00:00
David Simcha
09962831b2
More higher order range testing improvements.
2010-07-03 21:42:27 +00:00
David Simcha
18e300d60f
@property and infiniteness propagation in std.algorithm.
2010-07-01 02:39:50 +00:00
David Simcha
96aed784bc
Bug 3872: std.algorithm.filter could become bidirectional if its input range is bidir
2010-07-01 02:24:58 +00:00
David Simcha
619beee74d
Improve unittests for higher order ranges in std.algorithm, fix some unlisted bugs.
2010-06-30 02:30:26 +00:00
David Simcha
6f1dc2378d
save() for std.algorithm.filter, WITH proper unittests.
2010-06-23 12:45:32 +00:00
Masahiro Nakagawa
8854724323
bugzilla 4363: std.algorithm.Until is not a forward range
2010-06-23 00:54:07 +00:00
David Simcha
73f91e5d72
Add infiniteness propagation to Map, Filter.
2010-06-18 02:31:03 +00:00
David Simcha
2d576cfb8d
Bug 2872: Length, opIndex for Map
2010-06-18 02:18:55 +00:00
Andrei Alexandrescu
7b68030f9b
Fixed startsWith regression; replaced heap uses from heap range to heap container
2010-06-10 15:55:46 +00:00
Andrei Alexandrescu
7707f662a8
minor improvement in template constraint
2010-06-08 22:49:54 +00:00