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
Nick Treleaven
a70f96377c
std.variant: Fix constraints for Algebraic opEquals, opCmp.
...
This avoids internal error messages in VariantN.this.
2016-11-23 10:43:39 +00:00
Nick Treleaven
9fcc269f1e
Ensure VariantN.opIndexAssign takes a suitable value
2016-11-23 10:37:21 +00:00
Nick Treleaven
b1d6e9c143
Tweak Variant docs
...
Avoid unnecessary repetition of current symbol name.
Add LREFs where useful.
Remove fun(T...)(T args) example cited for old std.boxer module.
2016-11-07 10:43:04 +00:00
Nick Treleaven
0258383953
Cleanup visit throws docs, add VariantException LREF
...
Also fix redundant opening of C-style comment.
2016-11-06 19:09:37 +00:00
Nick Treleaven
5f32c11969
std.variant : Tweak tryVisit, visit docs
...
Parameter Handler -> Handlers.
Document inner template functions.
2016-10-27 17:36:21 +01:00
Cauterite
8b50e1359e
Update variant.d
2016-08-15 21:24:24 +10:00
Cauterite
a63348d8c2
unittest for variant bug 16383
2016-08-15 21:12:15 +10:00
Cauterite
90e7fd0ab4
fix Issue 16383 - 'Algebraic visit does not match const'
2016-08-14 04:21:31 +10:00
Jack Stouffer
503e9f8cb3
Removed global core.stdc.string import from std.variant
2016-07-03 19:39:35 -04:00
Jack Stouffer
909c46251a
Removed global std.exception import from std.variant
2016-07-03 19:37:41 -04:00
Jack Stouffer
6a79d1ea06
Removed global std.conv import from std.variant
2016-07-03 19:33:02 -04:00
Walter Bright
853496f7d2
std.variant: add attributes of test cases
2016-06-27 18:16:50 -07:00
Sebastian Wilzbach
ec47ac4224
Remove the WEB macro in favor of HTTP
...
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
18b8abf60a
remove the deprecated wiki macros
2016-05-27 05:52:23 +02:00
Vladimir Panteleev
38a6370788
Merge pull request #4303 from wilzbach/mref_phobos
...
use mref macro instead of link2
2016-05-24 03:12:08 +03:00
Hackerpilot
e702b0ec99
Fix the behavior of a unit test
2016-05-23 14:04:45 -07:00
Sebastian Wilzbach
89a2dd5f11
use mref macro instead of link2
2016-05-16 03:30:08 +03:00
Jack Stouffer
f6bfee2a9c
Fixed long lines in std/variant.d
2016-05-10 20:51:39 -04:00
Sebastian Wilzbach
69a3d9e59f
fix static if mistakes
2016-05-07 14:38:03 +02:00
Sebastian Wilzbach
3d67cd228c
style fix: space between operators
2016-04-26 22:26:20 +03:00
H. S. Teoh
2f5a8bb99c
Merge pull request #4118 from MaksimZh/fix-15827
...
Fix Issue 15827 - std.variant.Variant can not be initialized with some struct
2016-03-30 10:15:19 -07:00
Maksim Zholudev
f9aa6f6efc
Fix Issue 15827. Avoid explicit use of parameter in delegate.
2016-03-28 11:32:34 +03:00
Dmitry Olshansky
00c5518e7e
Merge pull request #4112 from MaksimZh/fix-15823
...
Fix Issue 15823 - allow opIndex for const std.variant.Variant
2016-03-24 22:57:41 +04:00
Maksim Zholudev
918b58ec37
Fix Issue 15823 - Allow opIndex for const Variant
2016-03-24 18:06:42 +03:00
k-hara
a86eeb1059
Merge two equivalent branches
2016-03-18 13:43:34 +09:00
k-hara
22c8065ffd
fix Issue 15791 - Cannot get a stored nested struct object from Variant
2016-03-18 13:43:31 +09:00
Martin Nowak
0e95f6723a
Merge remote-tracking branch 'upstream/stable' into merge_stable
2015-10-27 15:55:59 +01:00
k-hara
1df5afebe4
fix Issue 15039 - Algebraic cannot store a Typedef along with Typedef'ed type
2015-10-22 11:39:10 +09:00
Vladimir Panteleev
ca01aeeb83
Merge pull request #3708 from kinke/variant
...
std.variant: don't assert that target address != null if type size is 0
2015-10-18 02:09:50 +00:00
Dragos Carp
d698887729
Remove obsolete TypeTuple references
...
Replace following names:
std.typetuple -> std.meta
TypeTuple -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple -> Fields
std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Martin
4e1b8dcc21
std.variant: don't assert that target address != null if type size is 0
...
A unittest triggers in line 1918 when testing Variant!(void[0]) with LDC
(current merge-2.068 branch).
When taking the address of a truly empty type, such as T[0], LDC always
returns a null constant; nothing is allocated on the stack.
Disabling this assert in case the target type's size is 0 should be safe,
there's no private state which could be modified by the following
assignment (it may still have side effects though) - right? ;)
2015-10-09 18:14:16 +02:00
Ryan Roden-Corrent
0057756b28
Allow Variant.visit to support const types.
...
Assuming that Foo.depth and Bar.depth are both const (e.g. both are just int
members), the following should compile:
-----
int depth(in FooBar fb) {
return fb.visit!((Foo foo) => foo.depth,
(Bar bar) => bar.depth);
}
-----
However, it was failing with:
std/variant.d(2246): Error: cannot implicitly convert expression (variant.peek())
of type const(Foo)* to Foo*
std/variant.d(2246): Error: cannot implicitly convert expression (variant.peek())
of type const(Bar)* to Bar*
This patch changes an explicit `T*` declaration to an `auto` declaration so
const types can be visited.
2015-08-11 22:21:38 -04:00
Robert burner Schadek
971a76d941
std.variant housekeeping
...
variant hat some code disabled due to compiler bugs.
Some of these bugs have been fixed.
This re-enables this dead code.
removed some old code
bug remove reverse
2015-07-24 14:46:56 +02:00
Andrei Alexandrescu
120cbc2959
Replace D_PARAM with D through variant.d
2015-06-08 10:55:04 -07:00
Andrei Alexandrescu
5f0a1a6751
Add ReplaceType, use it in Algebraic. Also add get!k to Variant.
2015-06-08 10:52:11 -07:00
Rainer Schuetze
adab223837
remove trailing whitespace, detab, tolf
2015-05-31 11:24:01 +02:00
Robert burner Schadek
ee6c1a2ca8
variant: alias syntax update
2015-05-28 19:15:35 +02:00
anonymous
ca9e097abd
do a reinterpret cast
...
opCast implementations may be incompatible, especially with inout. And
really, reinterpreting is the goal here.
2015-05-20 17:19:32 +02:00