Commit graph

823 commits

Author SHA1 Message Date
Nick Treleaven
2ceb13ed44 std.traits.TemplateOf doesn't return void for non-template functions #10527 2025-03-19 14:47:43 +00:00
Jonathan M Davis
aee681c468
Fix Bugzilla issue 24875 (#9090)
This makes it so that enums whose base type is an aggregate type are
also considered an aggregate type. It probably doesn't affect much code,
since isAggregateType isn't needed often, and it's fairly rare to
declare enums whose base type is an aggregate type, but in general, code
that cares whether a type is an aggregate type is going to care that an
enum's base type is an aggregate type.
2024-11-23 16:02:11 -08:00
Martin Kinkelin
b0ef9ac009 Merge remote-tracking branch 'origin/stable' into merge_stable 2024-11-17 01:17:07 +01:00
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues (#9070)
* Fix UndocumentedDeclarationCheck linting issue

* Fix IfConstraintsIndentCheck linting issue

* Address feedback

* Fix publictests CI

* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
Luis Ferreira
9c11552ac2
Fix issue 24686: SumType stopped working with unmatched DeducedParameterType template 2024-08-03 11:53:46 +02:00
Nick Treleaven
14b23633b7 [std.traits] Improve FunctionTypeOf docs 2024-04-01 05:52:13 +08:00
Paul Backus
fa0307e091 Revert "Fix Issue 24215 - isBasicType!Enum should be false"
This reverts commit 98326c477f.
2023-11-04 10:57:37 -04:00
Paul Backus
98326c477f Fix Issue 24215 - isBasicType!Enum should be false 2023-11-02 16:23:46 +01:00
Jonathan M Davis
1febc32aa6 Add Unshared to std.traits.
This is the shared equivalent of Unconst. It allows code to strip off
shared without stripping off const.
2023-10-31 11:51:59 +01:00
Paul Backus
4eb622ef4c Add std.traits.isQualifierConvertible 2023-10-27 09:15:57 +02:00
Nick Treleaven
c7ed8b2f04 Use mixin expression instead of mixin declaration 2023-07-30 16:06:57 +01:00
Nick Treleaven
826960b229 Use mixin expr, avoid concat, remove @trusted
Use return scope instead of @trusted workaround.
2023-07-29 13:25:23 +01:00
Nick Treleaven
c356395dcb Remove ParameterIdentifierTuple.Get template 2023-07-28 21:12:59 +01:00
Nick Treleaven
e55f2c2df3 [std/traits] Avoid template recursion for 3 Parameter traits 2023-07-28 20:58:26 +01:00
Nick Treleaven
b455568099
[std/traits] Improve getSymbolsByUDA test (#8774)
This is also necessary for https://github.com/dlang/dmd/pull/15363.
2023-06-28 16:22:15 +03:00
Dennis
5cd77a6e32
User hyperlinks to refer to bugzilla issues (#8766) 2023-06-16 14:45:44 +03:00
Walter Bright
3ccd2783ab
clarify documentation for std.traits.isIntegral (#8741) 2023-04-24 12:54:42 +03:00
Iain Buclaw
cfd5f13326 Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-03-15 22:42:49 +00:00
RazvanN7
67a47cf39d Fix Issue 23776 - getSymbolsByUDA fails to fetch symbols from module 2023-03-15 02:48:08 +01:00
Razvan Nitu
8143b89ab8
Merge pull request #8700 from ntrel/prefer-__traits
[std.traits] Add 'See also: __traits'
2023-03-06 17:33:00 +08:00
Geod24
928279879c Fix a printf prototype in std.traits test 2023-03-04 12:50:04 +01:00
Geod24
ca8fa6c4ca std.traits: Don't use soon-to-be-deprecated 'in ref' 2023-03-03 21:58:54 +01:00
Nick Treleaven
fdfaba2e18 Add links to spec/traits 2023-03-02 16:35:27 +00:00
Nick Treleaven
54655c13f1 Add newlines 2023-03-01 11:39:17 +00:00
Nick Treleaven
750cfdb523 Change note to see also
Add isNested.
2023-03-01 11:19:20 +00:00
Geod24
0dffb006ac Change a unittest in std.traits for upcoming deprecation 2023-02-28 15:49:24 +01:00
Nick Treleaven
fff2fea42b [std.traits] Prefer using __traits in new code
This reduces template instantiation overhead.
Note that some __traits accept type instances in addition to just types.
2023-02-25 13:30:33 +00:00
Razvan Nitu
eae52eb799
Merge pull request #8692 from ntrel/isSomeFunc
[std.traits] Simplify isSomeFunction
2023-02-22 01:05:03 +08:00
Nick Treleaven
d35d395072 [std.traits] Simplify isSomeFunction 2023-02-20 16:02:30 +00:00
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