Razvan Nitu
c9d1bd5813
Merge pull request #8691 from ntrel/return-type
...
More avoidance of std.traits.ReturnType
2023-02-20 22:44:59 +08:00
Razvan Nitu
0cec16af17
Merge pull request #8687 from n8sh/make-recent-isPointer-replacements-not-change-behavior
...
Fix recent isPointer changes to use is(T == U*, U) instead of is(T : U*, U)
2023-02-20 20:35:51 +08:00
Nick Treleaven
e9b234e73e
Tweak std.traits categories
2023-02-19 10:59:57 +01:00
Nick Treleaven
19c19a6e22
std.traits: Add note about ReturnType instantiations
...
Also avoid ReturnType in ForeachType.
2023-02-18 15:40:00 +00:00
Nathan Sashihara
68c7ec8d25
Fix recent isPointer changes to use is(T == U*, U) instead of is(T : U*, U)
...
The behaviors are different and the changes appear accidental rather
than deliberate. In at least one case the change would result in wrong
behavior:
https://github.com/dlang/phobos/pull/8635#issuecomment-1433898162
Affected PRs: #8635 , #8636 , #8637 , #8638 , #8639
2023-02-16 19:46:24 -05:00
RazvanN7
61658d2372
Remove alias this from classes in phobos
2023-01-26 14:35:08 +02:00
RazvanN7
ad92ea2f8d
Use traits(getVirtualMethods) instead of traits(getVirtualFunctions)
2023-01-12 23:06:28 +01:00
Walter Bright
7b4d3a4c3d
remove use of isPointer from std.traits
2022-12-01 12:15:51 +01:00
Razvan Nitu
e0dfddf77d
Merge pull request #8641 from WalterBright/implicitConv
...
replace isImplicitlyConvertible with is expression
2022-12-01 18:03:51 +08:00
Walter Bright
2c7e732236
replace isImplicitlyConvertible with is expression
2022-12-01 00:52:55 -08:00
Walter Bright
e0f0e876b3
remove isScalar check from std.traits.isPointer
2022-12-01 09:32:09 +01:00
RazvanN7
e305dc9f79
Fix getSymbolsByUDA by replacing broad __traits(compiles) with a more focused condition
2022-11-28 08:14:42 +00:00
Ate Eskola
bb145a09a6
Ate's work on safe ref counted
2022-09-11 01:35:35 +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
RazvanN7
d2c3da6d50
Fix Issue 20182 - [REG 2.086.0] std.traits.ParameterDefaults fails for copy constructor of nested struct
2022-04-18 22:26:49 +00:00
Paul Backus
8a368bde34
Add std.traits.DeducedParameterType
2022-03-20 14:57:25 -04:00
wolframw
b6efe02b64
Fix Issue 22695 - std.traits.isBuiltinType is false for typeof(null)
2022-01-27 18:42:28 +01:00
wolframw
ebccda03e1
std.traits: add examples
2022-01-27 01:14:25 +00:00
RazvanN7
bedcad87f8
Fix Issue 22704 - Linker error when running the public unittests
2022-01-25 18:48:04 +00:00
Martin Nowak
c0b9de79e3
Merge remote-tracking branch 'upstream/stable' into merge_stable
2021-12-12 22:38:03 +01:00
Per Nordlöw
0425866dcd
Fix Issue 22557 - std.traits.fqnType is missing support for typeof(null)
2021-12-01 10:29:22 +00:00
Razvan Nitu
8d6c5312b0
Merge pull request #8291 from andralex/issue22408
...
Fix Issue 22408 - Multiple issues in AllImplicitConversionTargets
2021-10-26 11:12:57 +03:00
Andrei Alexandrescu
c9f94d2461
Fix Issue 22408 - Multiple issues in AllImplicitConversionTargets
2021-10-25 17:32:09 -06:00
Per Nordlöw
08a8c51151
Use AliasAssign directly in EnumMembers
...
Don’t use map in EnumMembers
2021-10-19 15:09:49 +02:00
Razvan Nitu
5ee65fc2e8
Merge pull request #8292 from andralex/iterative-largest
...
Iterative Largest
2021-10-19 10:40:24 +03:00
Andrei Alexandrescu
8dbbe55294
Iterative isTypeTuple and a couple of simplifications
2021-10-18 18:42:55 -04:00
Andrei Alexandrescu
be1d9a252a
Replace single-element variadics template idiom with single alias parameter
2021-10-18 07:01:17 +00:00
Andrei Alexandrescu
d715c29567
Simpler TransitiveBaseTypeTuple
2021-10-18 07:01:13 +00:00
Razvan Nitu
9252a88919
Merge pull request #8288 from andralex/simplerCommonType
...
[TRIVIAL] Simpler CommonType
2021-10-18 09:01:26 +03:00
Andrei Alexandrescu
901ef54b7f
Iterative maxAlignment
2021-10-17 23:59:46 -04:00
Andrei Alexandrescu
4aaffaf256
Simpler Template*Of
2021-10-17 18:28:21 +00:00
Andrei Alexandrescu
d2c6766dda
Iterative Largest
2021-10-17 12:32:43 -04:00
Andrei Alexandrescu
cee36efec4
Simplify and generalize allSameType
2021-10-17 12:14:48 +00:00
Andrei Alexandrescu
f5c15d8469
[TRIVIAL] Simpler CommonType
2021-10-16 14:25:32 -04:00
MoonlightSentinel
bb2b31f892
Fix 22383 - Reject noreturn[] as an autodecodable string
...
`noreturn[]` does not contain characters and hence is not subject to
autodecoding. The previous behaviour caused the range primitives (`put`,
...) to call into autodecoding related functions which couldn't handle
`noreturn[]`.
That error caused `isInputRange!(noreturn[])` to yield false.
2021-10-14 17:23:16 +00:00
MoonlightSentinel
b612caa162
Fix 22368 - has[Unshared]Aliasing fails to instantiate for noreturn
...
The problem was that `noreturn` matched the special case for `Rebindable`
because the bottom type is implicitly convertible to any type.
2021-10-08 19:23:04 +02:00
Paul Backus
2cb2d6cd67
Refactor std.traits.EnumMembers
2021-10-03 22:13:35 +00:00
RazvanN7
3e7e0393e8
Re-add std.traits.Fields test with interface
2021-09-15 13:02:59 +00:00
RazvanN7
044b4a1b02
Temporarily comment one test in traits to be able to graciously fix druntime implementation
2021-09-15 09:35:04 +00:00
Per Nordlöw
6333fe3206
Replace template AliasThisTypeOf with inlined calls to __traits
2021-09-15 08:40:39 +00:00
Manu Evans
b86bb94ab9
Alias traits from druntime ( #7148 )
...
Alias traits from druntime
Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Signed-off-by: Eduard Staniloiu <edi33416@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: Razvan Nitu <RazvanN7@users.noreply.github.com>
2021-09-15 07:38:59 +00:00
Per Nordlöw
c799010b64
Make alias templates to core.internal.traits symbolic aliases to avoid extra te… ( #8227 )
...
Make alias templates to core.internal.traits symbolic aliases to avoid extra te…
Signed-off-by: Andrei Alexandrescu <andralex@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: unknown
2021-09-03 13:03:53 +00:00
Razvan Nitu
dc06862fa0
Merge pull request #8176 from ljmf00/fix-functiontypeof
...
Fix Issue #22140 : FunctionTypeOf fails for template opCall without any templated argument
2021-08-04 15:20:31 +08:00
Luís Ferreira
84f7c9b4b5
std/traits: FunctionTypeOf fails for template opCall
...
Fixes Issue #22140 .
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-08-04 01:47:07 +01:00
Geod24
c01b9a5b6f
Remove dead demangling code for funcattr / param stc
...
This code is dead since we now have a dedicated trait in the frontend,
instead of deriving it from the mangling.
2021-08-03 17:54:31 +09:00
Martin Nowak
3fff60bc50
Merge remote-tracking branch 'upstream/stable' into merge_stable
2021-07-13 12:24:06 +02:00
Luís Ferreira
5ed958c773
Fix #22110 : std.traits: isCallable fails for templated opCall ( #8161 )
...
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-07-08 06:45:54 +08:00
Nathan Sashihara
61c00065a8
Streamline std.traits.BuiltinTypeOf & IntegralTypeOf
...
This incidentally fixes a 'TODO' in BuiltinTypeOf: ifloat/idouble/ireal
and cfloat/cdouble/creal were being collapsed to ireal and creal and
their qualifiers were being discarded.
2021-06-22 12:32:40 +00:00
Nathan Sashihara
136b750df1
Improve memory usage & speed of std.traits.isIntegral & isSomeChar
2021-06-21 10:12:39 +00:00