Commit graph

259 commits

Author SHA1 Message Date
Geod24
04f3979317 Replace 'Issue XXX' with Bugzilla links
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Bernhard Seckinger
2584fd837f Fix Issue 15940 - ImplicitConversionTargets and class alias in struct 2019-12-10 15:29:18 +01:00
Martin Kinkelin
fe38be185b Fix std.variant unittest
Accomodate for the fact that a `VariantN!24` without explicit allowed
types is at least `real` aligned, and that can be 8 on some platforms
(e.g., 32-bit Windows for LDC with 64-bit `real`), so that the size is
aligned up to `24+4 + /*padding*/ 4 = 32`.
2019-08-29 18:29:35 +03:00
shove70
b289b55b7d Fix issue 19986 - Can't assign large const T to std.Variant.VariantN 2019-07-08 12:10:29 +08:00
The Dlang Bot
d6f1685a5c
Merge pull request #7084 from pbackus/fix-19994
Fix issue 19994 - Can't nest self-referential Algebraic types
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-07-08 05:15:05 +02:00
Mike
e0585fa785 Replace D1 operator overloads with D2 operator overloads 2019-07-04 13:33:53 +09:00
Paul Backus
8124b17e2c Fix issue 19994 - Can't nest self-referential Algebraic types 2019-06-22 16:08:07 -04:00
Kriyszig
c163aeeefc Removed alias 2019-06-21 16:39:52 +05:30
Kriyszig
6da85c4f8c Fix Issue 19987 - Reducing memory used by VariantN
Swapping the fptr and union around will avoid unnecessary padding.
2019-06-21 16:28:06 +05:30
Marco de Wild
613c0b1f72
fix Issue 11061 - Variant of an array can be compared with another array
Fixes 11061
2019-06-06 14:14:20 +02:00
Kriyszig
5c8888f402 variant.d: Gated unittests behind version(StdDdoc)
Prevents compilation of unittests into user modules
fix Issue 18818 - unittests are compiled into user modules
2019-03-31 12:12:27 +05:30
Joakim
073ea406c6 Loosen two tests for IEEE Quadruple precision and make sure std.variant.VariantN is properly aligned for Quadruples. 2018-12-17 19:58:33 +05:30
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Basile Burg
9784974742 refactor VariantN using D2 style opOpAssign operator overloads 2018-09-02 16:32:13 +02:00
Nathan Sashihara
af77205b1b Make PR#6684 pass unittests 2018-09-01 15:17:34 -04:00
Biotronic
71fc01cc63 Fix issue 19200 2018-08-28 14:52:02 +02:00
John Colvin
4b787c71fd
fix get and peek links in std.variant docs 2018-08-01 14:19:41 +01:00
Martin Nowak
8d4e3941cf Merge remote-tracking branch 'upstream/master' into stable 2018-06-16 07:27:16 +02:00
Steven Schveighoffer
2de6f8da22 Fix issue 18934 - make std.variant support getting types that have const
members.
2018-06-07 12:43:13 -04:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
Martin
a459a23245 Fix std.variant unittest
For all 64-bit targets with real.sizeof < 16, e.g., Win64 MSVC for LDC.
2018-04-26 22:53:59 +02:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
Sebastian Wilzbach
43813f75d8 Add public examples to std.variant + DScanner check 2018-03-21 18:54:06 +01:00
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00
Eduard Staniloiu
d87f5a981d Make VariantN infer dtor safety from types 2018-02-14 13:57:28 +00:00
Sebastian Wilzbach
1fd20cf0d5
Merge pull request #4204 from Biotronic/fix-10879
Fix Issue 10879 - std.variant Variant/Algebraic: Cant store static ar…
2018-01-31 07:03:44 +01:00
biotronic
875015e7af Fix Issue 10879 - std.variant Variant/Algebraic: Cant store static arrays > 32(/16) bytes 2018-01-28 13:40:37 +01:00
Sebastian Wilzbach
a972e266ed Allow running all unittest with -transition=complex 2018-01-17 11:14:32 +01:00
Sebastian Wilzbach
7de3787876 Use static foreach in Phobos 2018-01-03 17:30:11 +01:00
Sebastian Wilzbach
2678754347 Add StdUnittest to std.net.curl + stdx.allocator 2017-12-21 09:36:10 +01:00
Steven Schveighoffer
db28e80a4f Avoid using typeid to call postblit and destructor, as it does not take
into account the type qualifiers.
2017-08-17 09:26:03 -04:00
Steven Schveighoffer
373babe48e fix issue 13262 - Ensure shared data can be sent and received via
send/receive. Also now allows all types of shared items to be stored in
a Variant.
2017-08-16 11:35:11 -04:00
Sebastian Wilzbach
10d05229ae Make Phobos module examples runnable 2017-07-02 00:22:13 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d Sort imports 2017-06-12 07:54:38 +02:00
The Dlang Bot
5356dc2353 Merge pull request #4035 from rcorre/visit_any
Allow a generic function for std.variant.visit.
merged-on-behalf-of: unknown
2017-03-03 02:36:22 +01:00
Ryan Roden-Corrent
4267255608 Allow a generic function for std.variant.visit.
If a lambda with a single generic parameter is provided as a handler
to std.variant.visit, it is invoked for any type contained in the
Algebraic which does not have a handler for that type.

This allows something like:

```
// Assume Circle, Square, and Triangle all define center()
Algebraic!(Circle, Square, Triangle) someShape;
auto center = someShape.visit!(x => x.center);
```

This may be combined with explicitly typed handlers and a single
fallback handler for an empty variant:

```
Algebraic!(int, float, string) something;
something.visit!((string s) => s.length, // called for string
                 x          => x,        // called for int/float
                 ()         => 0);       // called if empty
```
2017-03-02 08:00:54 -05:00
Jack Stouffer
e554764c01 Merge pull request #5216 from wilzbach/unluckily-phobos
Replace LUCKY links with actual links
2017-03-01 15:17:19 -05:00
Sebastian Wilzbach
3817d6f37d Check public functions for public examples (#4998)
Check public functions for public examples
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-03-01 15:49:15 +01:00
Sebastian Wilzbach
d548e8830a Replace LUCKY links with actual links 2017-02-28 23:46:54 +01:00
Sebastian Wilzbach
a36cec8686 DScanner: automatially set all unattributed unittests to @safe or @system 2017-02-22 05:42:04 +01:00
Sebastian Wilzbach
805c720595 Unify Phobos by ensuring there's always a space after cast(...)
Command:

sed -E 's/([^"])cast\(([^)]*?)\)([[:alnum:]])/\1cast(\2) \3/g' -i **/*.d
2017-02-21 16:40:20 +01:00
Sebastian Wilzbach
5521541032 Unify assert style to have no spaces between the first brace
Application of:

sed -E "s/assert +\(/assert(/" -i **/*.d
2017-02-21 15:27:15 +01:00
Sebastian Wilzbach
87dec58a41 DStyle: Constraints on declarations should have the same indentation level 2017-02-17 07:36:23 +01:00
Nick Treleaven
8c2c11dbdf std.variant: Guard documented unittest members in VariantN
Move a non-documented unittest out of VariantN.
2016-12-08 10:53:57 +00:00
Jack Stouffer
94d3786d69 Merge pull request #4923 from ntrel/variant-opIndexOpAssign
Fix Issue 16758 - Variant.opIndex result not modified after opAssign
2016-12-06 13:46:46 +00:00
Jack Stouffer
eef757a0ab Merge pull request #4910 from ntrel/variant-opIndexAssign
Ensure VariantN.opIndexAssign takes a suitable value
2016-12-06 13:18:30 +00:00
Nick Treleaven
cdd2acb0d5 Fix Issue 16758 - Variant.opIndex result not modified after opAssign
Add VariantN.opIndexOpAssign.
Also undocument & tweak test for const(Variant).opIndex.
2016-11-24 15:41:05 +00:00
Nick Treleaven
e36fb0a670 Fix doc typos 2016-11-23 10:43:42 +00:00