Commit graph

712 commits

Author SHA1 Message Date
Geod24
1e73cb8ca7 std.traits: Add support for 'in' storage class
For a long time, the 'in' storage class was only a second class citizen,
merely an alias for 'const', which is a type constructor.
While it was also documented for a long time as being 'scope',
this was removed when 'scope' actually started to have an effect
(when DIP1000 started to be implemented).
Currently, a switch (-preview=in) allows to get back this 'scope'.

However, the 'in' storage class does not really exists,
it gets lowered to 'const [scope]' at an early stage by the compiler,
which means that we expose what is essentially an implementation
detail to the user.

There is a PR in DMD (dlang/dmd#11474) that aims to give 'in' an actual
identity, instead of it being lowered to 'const [scope]'.
The underlying motivation is to allow for extending 'in''s functionality,
giving it the ability to pass by 'ref' when necessary, and accept rvalues.

However, regardless of the second goal, having proper support for 'in'
would lead to less confusing messages, better code generation,
and less confusion w.r.t. the behavior of `std.traits.ParameterStorageClass`.
2020-08-01 19:39:20 +09:00
Per Nordlöw
8ef03bc2ee
Reuse new builtin trait isCopyable in std.traits.isCopyable (#7522) 2020-07-17 09:46:32 +08:00
Hiroki Noda
7fa4aaf86f std.traits: FunctionAttribute supports live function 2020-05-22 12:36:13 +09:00
Mathis Beer
cc8537110e Fix issue 20755: keep constness in ImplicitConversionTargets!(const/immutable class) 2020-04-21 13:25:39 +02:00
Mathis Beer
038d9fbc90 Fix parameter names on CopyConstness comment 2020-04-21 13:22:58 +02:00
The Dlang Bot
ffca395ed2
Merge pull request #7441 from Geod24/bugzilla-links
Change all bug ID to links
merged-on-behalf-of: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2020-04-14 17:42:07 +02:00
Steven Schveighoffer
0d7bdb90fb Fix issue 20733. Remove docs about copy construction from hasElaborateAssign. 2020-04-13 11:46:58 -04:00
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
Geod24
3140fb9e3a Issue 12931: Move shared to the RHS 2020-02-03 18:23:01 +09:00
Bernhard Seckinger
c6ef9e136d Fix Issue 8388 - std.traits.MemberFunctionsTuple doesn't work with
constructors or destructors
2020-01-29 09:28:42 +01:00
Alexandru Militaru
bb62aaca3d Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest 2020-01-19 14:05:17 +02:00
Bernhard Seckinger
2584fd837f Fix Issue 15940 - ImplicitConversionTargets and class alias in struct 2019-12-10 15:29:18 +01:00
Simen Kjærås
2a2018cf34 Fix issue 20054 - getSymbolsByUDA no longer works on modules 2019-12-02 00:42:23 +02:00
Simen Kjærås
f286ee1b2f Revert "Fix Issue 19105 - Bogus recursive template expansion via getSymbolsByUDA"
This reverts commit 86733d5a4a.
2019-12-01 21:58:39 +02:00
Harry T. Vennik
d6256037e1 Add Unconst to std.traits 2019-09-01 11:13:26 +02:00
Walter Bright
64ccd34045 improve documentation and tests for isAutodecodable() 2019-08-12 19:19:37 -07:00
RazvanN7
86733d5a4a Fix Issue 19105 - Bogus recursive template expansion via getSymbolsByUDA 2019-07-10 11:06:24 +03:00
Les De Ridder
4be9b5f59f Implement Phobos side of DIP1014 2019-06-30 22:51:05 +02:00
Marco de Wild
db843f1882
Explicitly stated that the enum name can be retrieved with __traits 2019-05-14 12:34:10 +02:00
Razvan Nitu
ef151b3ee8 Comment broken test in std/traits.d (#6956) 2019-04-11 16:37:38 +03:00
David Nadlinger
6b97ae69d7 std.range.primitive.{Autodecoding -> autodecodeStrings}
This follows Phobos naming conventions and is more self-documenting.
2019-03-23 19:32:56 +00:00
Walter Bright
158fb2f656 add std.range.primitives.Autodecoding 2019-03-23 01:57:04 -07:00
Andrei Alexandrescu
d0993b33fe
Code font 2019-03-18 19:20:40 -04:00
Walter Bright
56e36fb62e Improve documentation for StringTypeOf 2019-03-18 15:56:58 -07:00
tibi77
7ae2e67a47 Remove redundant body of @disable functions. Issue 14854 DMD (#6893)
Remove redundant body of @disable functions. Issue 14854 DMD
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-03-06 02:00:04 +01:00
Mathis Beer
8f24c53ec7 Fix issue 19689: don't use recursive template parameter iteration in std.traits.
Pull inner Impl templates out into std.traits so they're only instantiated once.
Use anySatisfy, staticMap instead of manually recursing.
2019-02-22 16:48:48 +01:00
Sebastian Wilzbach
c1c6c80909 std.traits: use assumePurein the public example 2019-01-31 14:59:02 +01:00
The Dlang Bot
93f1b31fbf
Merge pull request #6799 from TurkeyMan/max_alignment
simplify maxAlignment
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-12-29 22:02:49 +01:00
Martin Nowak
6804bf18cd Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-12-24 17:26:02 +01:00
The Dlang Bot
43be36c179
Merge pull request #6790 from joakim-noah/stable
Android and AArch64: tweak tests that trip
merged-on-behalf-of: unknown
2018-12-18 03:26:39 +01:00
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
Manu Evans
19e8ff244d Simplify isInnerClass 2018-12-10 21:23:59 -08:00
Manu Evans
655a818f13 simplify maxAlignment (because max is gigantic!) 2018-12-09 23:44:47 -08:00
The Dlang Bot
19f72cfe7f
Merge pull request #6789 from Biotronic/Issue-19456
Fix issue 19456 - ParameterIdentifierTuple incorrect for abstract met…
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2018-12-09 13:05:12 +01:00
jsatellite
01784b0ee9
Fix for issue 19466 2018-12-05 10:13:11 +00:00
Martin Nowak
c60001a44f Merge remote-tracking branch 'upstream/stable' into merge_stable 2018-12-04 19:43:30 +01:00
Simen Kjærås
9f9988bfeb Fix issue 19456 - ParameterIdentifierTuple incorrect for abstract methods with unnamed parameters 2018-12-03 12:04:03 +01:00
Stanislav Blinov
43545feff8 Fix Issue 19444. 2018-11-30 11:19:58 +03:00
Basile Burg
aad0e0d760 Remove AliasSeq when __traits is directly aliasable 2018-11-29 11:21:20 +01:00
Geod24
faf48bd493 Remove support for extern(Pascal) 2018-11-19 12:39:43 +01:00
Nicholas Wilson
10a969ddaa
Merge pull request #6762 from edi33416/reduce_hasElaborateDestructor
Remove duplicate of hasElaborateDestructor implementation
2018-11-15 12:17:59 +08:00
Eduard Staniloiu
23d6f0419e Remove duplicate of hasElaborateCopyConstructor implementation 2018-11-14 19:54:50 +00:00
Eduard Staniloiu
97e0e82e37 Remove duplicate of hasElaborateDestructor implementation 2018-11-12 16:22:06 +00:00
Eduard Staniloiu
430a631570 Remove duplicate of Unqual implementation 2018-11-12 14:23:42 +00:00
The Dlang Bot
b166873570
Merge pull request #6750 from edi33416/reduce_isImplConv
Simplify isImplicitlyConvertible trait
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2018-11-09 00:24:20 +01:00
Eduard Staniloiu
7c30a7adf8 Simplify isImplicitlyConvertible trait 2018-11-05 13:57:25 +00:00
Per Nordlöw
fc96b0a99d make some traits iterative using static foreach 2018-10-23 21:22:57 +02:00
Alexandru ermicioi
0648b8706f Fix issue 17276 added additional case for objects that do not have as root class Object. 2018-10-01 18:21:30 -04:00
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
bcc9d57b20 Fix issue 19228 - hasAliasing fails on static arrays 2018-09-06 09:35:16 +02:00