Commit graph

5782 commits

Author SHA1 Message Date
Andrej Mitrovic
c69d2959e8 Fix12596 - Implement Typedef ctor that can take itself as the parameter. 2014-04-19 14:44:52 +02:00
monarch dodra
f07abda274 Fix Issue 11308 - Don't use Voldemort types for std.process output
So that the return type of `execute` and `executeShell` are compatible.
2014-04-18 08:10:35 +02:00
Steven Schveighoffer
30f61bda02 Merge pull request #2076 from monarchdodra/appenderExtend
Fix Appender extend
2014-04-17 11:00:56 -04:00
Safety0ff
138b0def6b Fix complexity in red-black tree documentation
For the existing implementation front() and opSlice() are O(1).
2014-04-14 13:51:02 -04:00
monarch dodra
a7f08aaa31 Merge pull request #2074 from dymk/fix-12540
Add unittest for 12540
2014-04-14 13:19:36 +02:00
monarch dodra
98d7d72aa2 Merge pull request #2078 from ntrel/byLine-testTerm
[trivial] Simplify byLine unittest code
2014-04-14 13:19:11 +02:00
Andrej Mitrovic
689282a9c2 Merge pull request #2080 from AndrejMitrovic/DeadCode
Remove Ref template
2014-04-13 09:26:19 +02:00
monarchdodra
2b4ab244ef Cover 12428 2014-04-12 14:59:11 +02:00
monarchdodra
dacaa16069 Fix appender's extend 2014-04-12 14:59:11 +02:00
Andrej Mitrovic
e9e8d93ce1 Merge pull request #2079 from monarchdodra/6998
Fix Issue 6998 - std.container.Array destroys class instances
2014-04-12 13:54:11 +02:00
Andrej Mitrovic
2604610475 Remove Ref template which was undocumented, unused, and had a non-working implementation. 2014-04-12 13:43:48 +02:00
Dylan Knutson
bcf0f978e5 Add unittest for 12540 2014-04-11 12:24:34 -07:00
monarch dodra
357dd22a56 Merge pull request #2057 from Biotronic/master
Generalized binaryReverseArgs for more args
2014-04-11 21:09:58 +02:00
monarch dodra
86b117ed57 Fix Issue 6998 - std.container.Array destroys...
... class instances
2014-04-11 21:05:42 +02:00
Nick Treleaven
fb088fa08a Don't wrap testTerm() with default arguments
The code is clearer without the extra function and with explicit
arguments.
2014-04-11 11:54:57 +01:00
Steven Schveighoffer
c5e5694165 Merge pull request #2046 from monarchdodra/appenderUseUp
Fix "use up capacity" in Appender
2014-04-08 18:53:09 -04:00
Walter Bright
e8cb8cabf8 Windows API functions are nothrow 2014-04-07 12:21:59 -07: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
monarch dodra
abcf061a93 Merge pull request #2051 from tom-tan/safe-pure-nothrow-std-random-generators
Mark methods for random number generators in std.random as safe pure not...
2014-04-05 23:32:46 +02:00
monarch dodra
4235a4295b Merge pull request #2063 from blackwhale/faster-sets
Use plain uint array for InversionList (std.uni)
2014-04-04 17:27:34 +02:00
Tomoya Tanjo
e520962982 Mark LinearCongruentialEngine.front and XorshiftEngine.front as const 2014-04-04 11:34:37 +09:00
k-hara
b32e4032c1 fix Issue 11778 - format for null does not verify fmt flags. 2014-04-03 22:39:46 +09:00
monarch dodra
c9666fb102 Merge pull request #2068 from 9rnsr/fix12505
Issue 12505 - Null pointers are pretty-printed even when hex output is requested
2014-04-03 13:40:59 +02:00
k-hara
b52649ab8b fix Issue 12505 - Null pointers are pretty-printed even when hex output is requested 2014-04-03 19:47:00 +09:00
monarch dodra
0ba2004bd4 Merge pull request #2050 from WebDrake/uniform01
Fix Issue #5240: faster std.random.uniform for [0.0, 1.0) range
2014-04-03 08:34:04 +02:00
k-hara
384a1da82f fix property enforcement 2014-04-03 13:46:40 +09:00
k-hara
46eef6b58e Supply the lacked local import 2014-04-03 12:37:30 +09:00
Dmitry Olshansky
e33cfdb04f Use plain uint array for InversionList
Storage for static data was long since compressed so it no longer plays a role at compile-time.
Memory requirements at run-time are modest anyway.
2014-04-03 01:49:19 +04:00
monarch dodra
8e66abb2fc Fix "use up capacity" in Appender 2014-04-02 18:26:32 +02:00
Steven Schveighoffer
277b7ce8c0 Merge pull request #2045 from monarchdodra/appenderConstruct
Fix Appender constructor signature
2014-04-01 08:56:53 -04:00
Andrei Alexandrescu
74d394737f Merge pull request #2049 from AndrejMitrovic/Fix5316
std.getopt: Add character-separated elements support for arrays and associative arrays
2014-03-31 23:34:08 -07:00
monarchdodra
6ea7bf2fa7 Fix Appender constructor 2014-03-31 20:21:15 +02:00
monarch dodra
78d84e515a Fix Issue 12494 - to!string(enum) incorrect value 2014-03-31 19:47:48 +02:00
Andrej Mitrovic
9924b7aba5 Fixes Issue 5316 - Add character-separated elements support for arrays and associative arrays. 2014-03-31 18:25:27 +02:00
Simen Kjærås
e35c5058c3 Generalized binaryReverseArgs for more args 2014-03-30 21:54:34 +00: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
a8c60a9cdb Clarify DDoc of hasElaborateAssign
Split the overly long sentence in two, otherwise
it's easy to miss the point about auto-generation.
2014-03-29 15:50:03 +04:00
monarch dodra
1863cb48f9 Merge pull request #2036 from blackwhale/ctfe-move
Make move CTFEable for simple structs and classes
2014-03-28 18:51:08 +01:00
k-hara
ec661877f5 Fix newly introduced FQN issue caused by 313 2014-03-28 23:40:04 +09: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
Joseph Rushton Wakeling
93fe844b72 Small optimization to uniform01
Only need to chech u < 1 if RNG returns non-integral variates.
2014-03-27 21:18:40 +01: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
Dmitry Olshansky
05b60c2492 Merge pull request #1390 from monarchdodra/swapPointsTo
Fixup for 9975: swap and pointsTo
2014-03-27 00:56:49 +03:00
Andrei Alexandrescu
68c6379e46 Merge pull request #2048 from AndrejMitrovic/Fix5228
Issue 5228 - Add GetOptException and document exceptions
2014-03-26 06:02:02 -07:00
Tomoya Tanjo
412ec99bea Mark methods for random number generators in std.random as safe pure nothrow 2014-03-26 20:19:11 +09: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
Joseph Rushton Wakeling
d0727dc7a0 Fix Issue #5240: faster std.random.uniform for [0.0, 1.0) range
Following typical design in other languages, the function is named
uniform01.  It can be templated on floating-point type, defaulting
to double if none is specified.

The implementation is pretty much derived from its counterpart in
Boost.Random, in particular in its taking account of the different
requirements for integral versus floating-point RNG values, and in
checking that the generated variate is less than 1 before returning.
This last check is necessary simply because we can't guarantee, in
the case of a floating-point based RNG, that we will not get a
result exactly equal to 1.

Fixes http://d.puremagic.com/issues/show_bug.cgi?id=5240
2014-03-25 21:09:41 +01:00
Andrej Mitrovic
2a1df9fc0e Merge pull request #2047 from monarchdodra/12449
Fix Issue 12449 - Undefined format in std.algorithm.max
2014-03-25 11:23:22 +01:00