Commit graph

612 commits

Author SHA1 Message Date
Iain Buclaw
fd5facfe04 posix.mak: Enforce whitespace before opening parenthesis for version conditions 2018-09-22 16:57:24 +02:00
Simen Kjærås
ad8361b369 Fix issue 19240 - std.typecons.Tuple should check for reserved identifiers 2018-09-19 08:28:06 +02:00
Iain Buclaw
2d458405e1 std.typecons: Unittest isn't safe 2018-09-11 01:18:07 +02:00
Nathan Sashihara
6c65e24a8c
Merge pull request #6677 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
2018-09-09 15:09:48 -04:00
Nathan Sashihara
947ba51707 Fix Issue 19236 - Replace runtime typeid(T).initializer().ptr is null checks with compile-time __traits(isZeroInit, T) 2018-09-09 12:19:34 -04:00
Mathis Beer
b16ae5b8a5 Fix Issue 18682: Forward Nullable.toHash to contained value, if non-null. 2018-08-20 11:13:25 +02:00
The Dlang Bot
9e1870c053
Merge pull request #6527 from denizzzka/master
Adds const to Typedef.toString
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-08-04 07:05:34 +02:00
Mathis Beer
b0972bdda3 Nullable: with implicit destruction disabled, generate and test an explicit destructor that only runs if !isNull 2018-07-20 13:11:08 +02:00
Mathis Beer
4af38e5c73 Exploit unions to avoid destructor call to wrapped type in Nullable 2018-07-20 13:11:08 +02:00
Mathis Beer
11b4a15735 Add testcase for issue 19037
unittest fix
2018-07-20 13:11:08 +02:00
Mathis Beer
c1431b133b Use move/moveEmplace in Nullable
Fixes issue 19037.
2018-07-20 13:11:08 +02:00
Martin Kinkelin
842cdc4d1c std.typecons: Get rid of unnecessary core.stdc.uintptr_t import
Importing std.algorithm and std.range would previously import these
core.stdc.* modules:

core.stdc.stdint
core.stdc.config
core.stdc.stddef
core.stdc.signal
core.stdc.wchar_
core.stdc.stdarg
core.stdc.stdio
core.stdc.time

With this, only core.stdc.stdarg remains.

This is a big deal for bare-metal platforms without C libs, e.g.,
WebAssembly.
2018-07-19 20:30:22 +02:00
Sebastian Wilzbach
8115d50f14 Fix auto function without return statement 2018-06-28 10:58:14 +02:00
Walter Bright
6ce1a7ab81 typecons: add scope 2018-06-08 19:53:52 -07:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
Denis Feklushkin
20b0226be3 Typedef.toString for const types 2018-05-30 12:01:25 +07:00
Basile Burg
2cd3b5dac2 fix issue 18415 - Typedef ignores @disabled default constructor 2018-05-18 20:23:33 +02:00
Quirin F. Schroll
7356009423 fix table and example in docs 2018-05-08 15:32:03 +02:00
Q. F. Schroll
07dffef19f use unittest as an example 2018-05-08 01:56:37 +02:00
Q. F. Schroll
f73972eada fix documentation 2018-05-08 01:55:10 +02:00
Q. F. Schroll
7f09359211 use static foreach instead of foreach (i, _) 2018-05-07 21:07:50 +02:00
Q. F. Schroll
35c4871e6f justification does not fit a formal documentation 2018-05-07 21:01:18 +02:00
Q. F. Schroll
961ad8c33d remove unnecessary template 2018-05-07 21:00:39 +02:00
Sebastian Wilzbach
79b8fd63ad
Merge pull request #6457 from n8sh/issue-18766
Fix Issue 18766 - std.typecons.Tuple.toHash could be improved
2018-05-03 01:53:37 +02:00
Nick Treleaven
a7c1d1ae2a Clarify that Nullable!T.get doesn't always throw 2018-04-23 18:51:38 +02:00
Nick Treleaven
778cdaac51 get doesn't throw in release mode 2018-04-23 18:51:38 +02:00
Nick Treleaven
f94a50db48 Fix Nullable.get docs 2018-04-23 18:51:38 +02:00
Nathan Sashihara
307ac7e462 Fix Issue 18766 - std.typecons.Tuple.toHash could be improved 2018-04-18 12:08:28 -04:00
Jack Stouffer
bc1c3b58f5 Removed scope wide @trusted use in std.typecons 2018-04-11 14:36:17 -04:00
Simon Naarmann
65b1f1af77 Fix Issue 18615 - Rebindable!A calls A.opEquals
The issue was that Rebindable!A always compared two rebindable
references by 'a is b', not by A.opEquals. With this fix, two rebindable
references, or a rebindable and a raw reference, always compare with
A.opEquals.
2018-04-05 07:20:22 +02:00
The Dlang Bot
a62f6e3c81
Merge pull request #6386 from wilzbach/fix-14637
Fix Issue 14637 - Array operations should work on tuples
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-04-04 14:29:57 +02:00
Sebastian Wilzbach
cddd0df51a Fix Issue 4591, 14637 - Array operations should work on tuples 2018-04-04 12:46:23 +02:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
Andrei Alexandrescu
abdce33502 Update typecons.d 2018-03-31 08:24:34 +02:00
Andrei Alexandrescu
fb73b6209c
Followup to addition of apply
* inline code words easiest as backticks
* prefer https to http
* apply should not be "opinionated" about value vs reference, just transparently pass arguments through
2018-03-30 10:37:17 -04:00
carblue
73ece51c47 std.typecons: Fix a -dip1000 compilable issue 2018-03-30 01:12:36 +02:00
The Dlang Bot
bf8812e4c5
Merge pull request #6318 from wilzbach/public-typecons
Add public examples to std.typecons + DScanner check
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2018-03-27 23:43:17 +02:00
Sebastian Wilzbach
d1f8e92ce8 Add public examples to std.typecons + add DScanner check 2018-03-27 21:55:40 +02:00
The Dlang Bot
0c9a10b439
Merge pull request #6182 from FeepingCreature/feature/nullable-bind
Implement apply for Nullable, in analogy to Haskell's monad operation
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-03-27 15:11:26 +02:00
Sebastian Wilzbach
8f86a0d734 Fix if constraints indentation 2018-03-24 13:17:53 +01:00
FeepingCreature
057386f75c std.typecons.apply: make unittest clearer 2018-03-09 18:18:18 +01:00
The Dlang Bot
df68d4c42c
Merge pull request #6218 from denizzzka/typedef_tostring
Adds Typedef.toString()
merged-on-behalf-of: MetaLang <MetaLang@users.noreply.github.com>
2018-03-01 15:24:03 +01:00
Denis Feklushkin
636a0f9c97 Adds Typedef.toString 2018-03-01 13:09:46 +07:00
drug007
35c5a3925c Fix #18539 - add regression test 2018-02-28 19:18:12 +01:00
Sebastian Wilzbach
fb070e1a06 Make test for an unsafe enum more explicit 2018-02-24 15:03:25 +01:00
Sebastian Wilzbach
6dbc8d00d7 Use DStyle for the if constraints 2018-02-24 14:56:57 +01:00
Martin Nowak
327fec1946 add opDispatch-based property access to BitFlags enum
- allows to use BitFlags similar to a struct with many boolean flags
- allows for less brittle flag test
  (`flags.featureX` vs. `(flags & FlagsEnum.featureX)`)
- allows for clear set/unset
  (`flags.featX = false` vs. `flags &= ~FlagsEnum.featX`)
- allows for simpler testing of combined (unsafe) flags
  (`flags.combined` vs.
   `(flags & FlagsEnum.combined) == BitFlags!(FlagsEnum, Yes.unsafe)(FlagsEnum.combined)`)
2018-02-24 14:35:05 +01:00
Martin Nowak
09926f9837 Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-02-23 21:37:12 +01:00
Jack Stouffer
8c67a25f16 Added writer version of toString to Nullable 2018-02-20 16:39:10 -05:00
Jack Stouffer
663b5b9278 Revert addition of StdUnittest 2018-02-20 13:32:32 -05:00