Commit graph

730 commits

Author SHA1 Message Date
Lucian Danescu
322fed7bf7 add local imports 2022-11-12 19:29:28 +02:00
Lucian Danescu
cdee7e6939 remove redundant attributes in typecons.d 2022-11-04 21:52:10 +01:00
Mathias LANG
3c97810b36
Re-instate accidentally reverted fixes on RefCounted (#8599)
Those fixes were done in PR #8509 but PR #8368 accidentally reverted them.
2022-10-14 06:23:22 +08:00
Ate Eskola
bbd03c9351 Added the needed AliasSeq import to betterC tests. 2022-09-21 23:08:14 +03:00
Ate Eskola
d7b6838fc2 Took copies of most SafeRefCounted unit tests for RefCounted. 2022-09-17 19:48:05 +03:00
Ate Eskola
c277df5547 Applied suggested documentation fixes. 2022-09-17 18:57:22 +03:00
Ate Eskola
490caa7090 RefCounted -> SafeRefCounted, OldRefCounted -> RefCounted. 2022-09-11 01:35:35 +03:00
Ate Eskola
bb145a09a6 Ate's work on safe ref counted 2022-09-11 01:35:35 +03:00
Atila Neves
be598abbeb Atila's work on safe ref counted 2022-09-11 01:35:35 +03:00
Martin Nowak
85d0520220 Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-09-10 15:23:06 +02:00
wolframw
7ce739c5ff
fix issue 23238 - Cannot write a const Nullable(T, T nullValue) 2022-08-26 00:15:55 +02:00
Walter Bright
056606ea56 get std.typecons to compile with PR #14364 2022-08-15 11:48:45 +00:00
Geod24
501a3ab35a std.typecons: Remove workaround for fixed issue 15862 2022-07-18 17:11:59 +02:00
Iain Buclaw
a9a504f406 Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-07-09 17:08:41 +02:00
Razvan Nitu
7e0dbdf1a3
Merge pull request #8500 from RazvanN7/fix_scope_failure
Use try-catch instead of scope(failure) for block that returns
2022-07-07 16:08:38 +03:00
RazvanN7
52935b182a Use try-catch instead of scope(failure) for block that returns 2022-07-07 15:28:43 +03:00
Martin Kinkelin
b20444aca4 Use new __traits(classInstanceAlignment)
Tackling the Phobos part of issue 16508.
2022-05-13 18:38:09 +00:00
Hiroki Noda
5429908c4a Fix: add missing FunctionAttribute 2022-04-25 15:22:59 +00:00
Cameron Ross
90f65d49fb Add range interface to Nullable 2022-03-27 19:18:11 +00:00
Arne Ludwig
3a2cf7f3cb Fixed negation of BitFlags
- negation did not work with unsigned integers with dmd v2.099.0
- also made double negation of flags possible
2022-03-22 12:47:36 +00:00
Iain Buclaw
68ae00efbc Merge branch 'stable' into merge_stable 2022-02-11 22:11:48 +01:00
Mathis Beer
ac5c8d0c85 Fix issue 22701: Remove is(typeof()) callable check in std.typecons.apply.
It creates unreadable template errors for no benefit.
2022-01-26 13:03:29 +01:00
The Dlang Bot
a86c1eba9f
Merge pull request #6876 from thaven/enhancement/autoimplement-add-abstract-parent
Also expose 'parent' when it's abstract

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-01-18 03:54:04 +00:00
Martin Kinkelin
9db3a9afdf Work around issue 22619 - Avoid Nullable copy ctor unless required
Copy ctors are still buggy, so unconditionally adding one for Nullable
is everything but a non-breaking change (and was added in the 2.098.1
point release).
2022-01-10 16:48:29 +01:00
Nick Treleaven
9f336484dc [typecons] Tweak Tuple example and split out Rebindable example 2022-01-10 14:03:09 +00:00
Eduard Staniloiu
95d47777f9 Fix typecons Proxy.opCmp 2021-12-17 17:13:48 +00:00
thaven
47291bb0e6 Temporarily comment out overload in test to work around Issue 19715 2021-12-03 14:07:14 +01:00
Harry T. Vennik
eeccd10f8b Add specific test for parent alias 2021-12-03 14:07:14 +01:00
Harry T. Vennik
443c5d400f Also expose 'parent' when it's abstract 2021-12-03 14:07:14 +01:00
dkorpel
5d0cfcd13a Fix scope usage of SysTime/TimeZone 2021-11-18 23:49:51 +00:00
Ömer Faruk IRMAK
e84de9faae Fix Issue 22511 - Add explicit copy ctor for Nullable 2021-11-15 11:33:51 +03:00
Ömer Faruk IRMAK
b141ae469b Fix Issue 22511 - Add explicit copy ctor for Nullable 2021-11-15 10:33:27 +03:00
DoctorNoobingstoneIPresume
eb66705762 refCounted: unittest now also checks object destruction..
One of the `unittest`'s has been modified to also check that
a `File` object managed via `RefCounted!File` handles is deleted
when its last handle is destroyed;
2021-09-27 02:19:34 +03:00
Paul Backus
1984e8d2a9 Fix Issue 22325 - ReplaceType fails on templated type instantiated with void-returning function
Previously, when recursing into a type's template arguments,
ReplaceTypeUnless would mistakenly attempt to evaluate a template alias
parameter as an expression. In cases where the alias parameter was not a
valid expression or could not be evaluated at compile time, this caused
a compilation failure; in other cases, it caused ReplaceTypeUnless to
give an incorrect result.

This change makes ReplaceTypeUnless correctly treat template alias
parameters as aliases.
2021-09-20 21:42:31 +00:00
Martin Kinkelin
d0bf92cab7 std.typecons: Minimize redundant template declarations/instantiations wrt. Tuple
While glancing over the Tuple template, I've noticed that it uses the
anti-pattern of nested template declarations *not* depending on the
outer Tuple template parameters.
2021-09-17 04:38:55 +00:00
Luís Ferreira
d19c437da9
std.typecons: make Nullable payload void initialized
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-29 18:41:47 +01:00
Martin Nowak
31a946b999 Merge remote-tracking branch 'upstream/stable' into merge_stable
Conflicts:
	std/typecons.d
2021-08-09 22:41:03 +02:00
Mathis Beer
f0372ae659 Fix issue 22176: Revert 51bdf472df
Revert "Fix Issue 20552 - Deprecated Nullable.get warning with Appenders"
`Nullable.get` is removed anyways.
2021-08-07 17:11:55 +00:00
aG0aep6G
26bb8fcae4
add cast(void) to silence warnings in tests (#8169) 2021-07-20 08:19:00 +08:00
Martin Nowak
3fff60bc50 Merge remote-tracking branch 'upstream/stable' into merge_stable 2021-07-13 12:24:06 +02:00
Vladimir Panteleev
73e51d395e Fix Issue 22100 - Support chained assignment of Nullable 2021-07-05 16:23:44 +00:00
Vladimir Panteleev
7d666a26c0
Fix Issue 22101 - Nullable.get(fallback) cannot be used with non-@safe/pure/nothrow types 2021-07-05 07:35:03 +00:00
Nathan Sashihara
c441b2ad59 Fix 22093 - [Reg 2.097] std.typecons.RefCounted!T for struct T without an explicit toString or alias this previously could be converted to string even when uninitialized but now cannot 2021-06-30 05:51:01 +00:00
Martin Nowak
dd2dc35c31 Merge remote-tracking branch 'upstream/stable' into merge_stable 2021-04-25 21:19:23 +02:00
berni44
b2019ebab0 Narrow imports of std.math in the rest of phobos. 2021-04-21 03:00:57 +02:00
berni44
1d713e6f73 Move unittests from std.format.internal.write at correct place. 2021-04-20 11:27:33 +02:00
Johan Engelen
b8cdef5ffc fix Issue 21801 - std.typecons.ReplaceType does not work for in parameters
See related: https://github.com/dlang/phobos/pull/7570
2021-04-15 09:36:51 +02:00
berni44
6237aa02a9 Deprecate public access of formatElement 2021-03-25 10:17:21 +01:00
Nick Treleaven
ea00d00937
std.concurrency docs: Group symbol links into table rows (#7892)
std.concurrency docs: Group symbol links into table rows
merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-03-22 10:21:12 +01:00
Boris Carvajal
c92818b58c Simplify some Proxy.opDispatch conditions 2021-03-22 03:36:54 +01:00