Михаил Страшун
04dee6bfe5
Merge pull request #2328 from quickfur/issue10693
...
Fix range violation for cartesianProduct of empty ranges.
2014-07-15 00:06:47 +03:00
H. S. Teoh
5f0155b0c8
.init value of cartesianProduct should be empty.
2014-07-14 12:47:28 -07:00
Lionello Lunesu
2815d548d3
Added std.algorithm.safeLess for safe signed/unsigned comparison; rewrote min/max
2014-07-13 13:09:45 +08:00
H. S. Teoh
6e51fdf469
Fix range violation for cartesianProduct of empty ranges.
...
Completes the fix for: https://issues.dlang.org/show_bug.cgi?id=10693
2014-07-12 07:07:52 -07:00
Walter Bright
bcceb5424b
Merge pull request #2276 from quickfur/cprod_improve1
...
cartesianProduct improvement
2014-07-10 14:11:41 -07:00
safety0ff
b54f32eee6
std.algorithm.remove: Change pop____N to pop____Exactly
2014-07-02 19:57:44 -04:00
safety0ff
93068b15bd
std.algorithm.remove: Fix constraints and change popBack loop to popBackN
2014-07-02 19:57:44 -04:00
H. S. Teoh
95ea9c82ea
Get rid of exponential template bloat for most common use case of cartesianProduct.
2014-07-02 16:01:35 -07:00
H. S. Teoh
66287d0f29
Update unittest and example code to reflect new ordering.
2014-07-02 15:59:32 -07:00
H. S. Teoh
a8f80e04f2
cartesianProduct: default order should be lexicographically sorted.
2014-07-02 15:59:32 -07:00
David Nadlinger
733b895a8a
[trivial] Fix copy/paste error in minPos doc comment.
2014-06-28 09:09:00 +02:00
safety0ff
6ff3378c79
Add unittests bug #12889
2014-06-16 19:42:30 -04:00
Dmitry Olshansky
fdf5307d88
Merge pull request #2202 from monarchdodra/swapPointsTo
...
reinsert doesPointTo in swap/move
2014-05-31 06:55:46 -07:00
monarchdodra
b974846d2d
Re-insert doesPointTo in swap/move
2014-05-31 13:44:12 +02:00
Dmitry Olshansky
66fcbadf4d
Merge pull request #2053 from monarchdodra/maxTweak
...
Tweak min and max for yet more efficiency
2014-05-31 04:10:15 -07:00
Dmitry Olshansky
0ae323dc6f
Merge pull request #2167 from monarchdodra/pointsTo
...
Fix issues 9975 & 12479
2014-05-23 22:44:25 +04:00
Walter Bright
c6b3eb0a85
convert jagged array with rectangular one
2014-05-18 00:39:19 -07:00
monarch dodra
a4e448be50
Tweak min and max for yet more efficiency
...
I checked the generated assembly code, and it looks pretty damn good. I've not been able to achieve any better anyways.
2014-05-17 20:06:12 +02:00
monarchdodra
c885157507
Change pointsTo to mayPointTo and doesPointTo
2014-05-14 21:58:02 +02:00
monarch dodra
254290daf7
Merge pull request #2128 from AndrejMitrovic/Fix11253
...
Issue 11253 - std.algorithm.count is not nothrow
2014-05-09 22:08:25 +02:00
monarchdodra
d609bd332f
Sed "@safe pure nothrow"
2014-05-06 08:21:13 +02:00
Andrej Mitrovic
5ad48eb130
Fix Issue 11253 - std.algorithm.count is not nothrow.
2014-04-28 14:40:15 +02:00
Andrej Mitrovic
8c24b1e875
Fix Issue 12293 - Add forward to std.algorithm's cheat-sheet.
2014-04-27 01:00:06 +02:00
Andrej Mitrovic
e549dd037b
Strip spaces.
2014-04-26 21:13:39 +02:00
Andrej Mitrovic
6f05fc3f63
Merge pull request #2075 from monarchdodra/sumInfer
...
safe pure nothrow sort and sum
2014-04-26 01:08:47 +02:00
monarch dodra
79903eb199
Merge pull request #2107 from AndrejMitrovic/Fix7246
...
Issue 7246 - Provide a simpler example for std.algorithm.remove.
2014-04-23 19:56:37 +02:00
Andrej Mitrovic
899155194a
Fix Issue 7246 - Provide a simpler example for std.algorithm.remove.
2014-04-23 16:39:17 +02:00
Andrej Mitrovic
ecddbf64dc
Fix Issue 11462 - std.algorithm.multiSort was missing from the index.
2014-04-22 23:45:29 +02:00
Andrej Mitrovic
d4b0e70c67
Fix Issue 11978 - Fix typos in std.algorithm documentation referencing parameter names.
2014-04-22 22:11:32 +02:00
monarchdodra
6c98c325f9
safe pure nothrow sort and sum
2014-04-09 18:48:24 +02:00
monarchdodra
6123ca3371
Fix Issue 12434 - std.algorithm.sum of immutable array too
...
https://d.puremagic.com/issues/show_bug.cgi?id=12434
Simply uses the inference's `Unqual` type as a seed, rather than the straight up result.
Also add some unittesting while at it.
2014-04-07 07:48:53 +02:00
Dmitry Olshansky
98434a5181
Merge pull request #2052 from monarchdodra/copyAssert
...
Add asserts in Copy (and remove an enforce)
2014-03-30 23:50:27 +04:00
Dmitry Olshansky
66fd049ea9
Make move CTFEable for simple structs and classes
...
memcpy is not CTFEable, so avoid it for structs without
dtor, postblit that can be assigned with plain =.
This leaves as is (compile error in CTFE) structs that contain
immutable/const memebers the fact that moves overwrites such
fields is questionable to begin with.
2014-03-28 00:24:21 +04:00
monarch dodra
dacbef4c98
Add asserts in Copy (and remove an enforce)
...
Adding extra asserts always helps. As for the enforce, I'm unsure why it was there in the first place: All the other branches simply make the assumption the target is large enough.
2014-03-27 18:49:12 +01:00
Andrei Alexandrescu
cecd745cef
Merge pull request #2015 from monarchdodra/emplaceQual
...
Improve emplaceRef for qualified construction
2014-03-26 18:03:39 -07:00
monarch dodra
4e4f73b646
Remove pointsTo in move
...
as well as remove erroneous documentation.
2014-03-25 21:21:33 +01:00
monarch dodra
782441ee1d
Fixup for 9975: swap and pointsTo
...
Fixing 9975 revealed that checking `pointsTo` was creating problems in swap for legitimate use cases.
This is because:
1. pointsTo can sometimes create "false positives"
2. Internal pointing is not outright forbidden, it is just that the runtime is allowed to make the assumption they don't exist.
While swapping aliasing objects is a sign of stink, it should still "just work".
2014-03-25 21:21:33 +01:00
monarch dodra
aec513e542
Revert
2014-03-24 16:39:56 +00:00
monarch dodra
72d78547cf
Update algorithm.d
2014-03-24 16:16:19 +00:00
monarch dodra
7f76f3fc3a
Update algorithm.d
2014-03-24 16:13:29 +00:00
monarch dodra
8370276924
Fix Issue 12449
...
Undefined format in std.algorithm.max
2014-03-24 13:41:44 +00:00
Andrei Alexandrescu
9404dd477f
Merge pull request #1970 from monarchdodra/sumseed
...
Give sum a seed capability
2014-03-19 18:08:06 -07:00
monarchdodra
59ad77ad9f
Improve emplaceRef for qualified construction
2014-03-17 22:48:30 +01:00
monarchdodra
69d181290c
Remove incorrect save
2014-03-14 22:41:34 +01:00
k-hara
6f80f6aa03
Add more local imports
2014-03-13 13:13:04 +09:00
monarch dodra
9231bdd0b3
Tweak map's save
...
Not only does it avoid opAssign issues, but the final code is simpler anyways.
2014-03-12 11:53:21 +01:00
Geod24
4ed10be8bc
Fix issue 12183 : Avoid using floating point in std.algorithm.sort.
...
- Prevent valgrind from aborting (some x87 FP operation are not supported).
- Can be slower on machines that have a soft floating point ABI.
2014-03-11 10:58:29 -07:00
monarchdodra
423f889580
Give sum a seed capability
2014-03-10 07:44:44 +01:00
Yazan S. Dabain
b8c29046f8
[Trivial] Fix documentation typos in std.algorithm
2014-02-28 10:37:44 +02:00
monarch dodra
4d16df5a73
Add sum to std.algorithm
's TOC
2014-02-27 10:05:51 +01:00