Commit graph

250 commits

Author SHA1 Message Date
Denis Shelomovskij
5747da9f49 Refactor std.traits.fullyQualifiedName and its unittests 2012-10-31 21:59:09 +04:00
Denis Shelomovskij
acb48634bd Add more std.traits.moduleName unittests 2012-10-31 21:59:09 +04:00
Denis Shelomovskij
cc8982d986 Refactor std.traits.moduleName and its unittests 2012-10-31 21:59:09 +04:00
Denis Shelomovskij
f173f980df Add more std.traits.packageName unittests
* some of the unittests are commented out because of the Issue 8922
* Issue 8922 URL: http://d.puremagic.com/issues/show_bug.cgi?id=8922
2012-10-31 21:59:09 +04:00
Denis Shelomovskij
303ca7c6b7 Refactor std.traits.packageName and its unittests 2012-10-31 21:27:48 +04:00
Denis Shelomovskij
60a1e79c5c Fix std.traits.hasElaborateCopyConstructor static arrays issue and improve unittests
* the issue is that static arrays can also have elaborate copy constructors
* unittests are merged from `hasElaborateDestructor` ones
2012-10-31 21:27:48 +04:00
Denis Shelomovskij
579a346d2c Improve std.traits.hasElaborateDestructor unittests 2012-10-31 21:27:33 +04:00
Denis Shelomovskij
8417ac1c4c Simplify std.traits.hasElaborateCopyConstructor 2012-10-31 02:06:20 +04:00
SHOO
080a3f3188 Enhancement of hasUnsharedAliasing for void delegate() shared
- hasAliasing supports `void delegate() immutable`
- hasAliasing supports `immutable(void delegate())`
- hasUnsharedAliasing supports `void delegate() shared` and `void delegate() immutable`
- hasUnsharedAliasing supports `immmutable(void delegate())`
- Add some unittest cases.
2012-10-31 00:34:32 +09:00
Denis Shelomovskij
98061d298e Create std.traits.classInstanceAlignment 2012-10-27 10:23:26 +04:00
Andrej Mitrovic
25d9fa021c Fixes Issue 8050 - Add missing asterisk in ddoc comment. 2012-10-27 05:17:28 +02:00
k-hara
f7f33b0cf7 Improve isAssignable to support identity assignable check. 2012-10-06 14:37:59 +09:00
monarch dodra
191dc5f5c6 Revert unqual for AA 2012-10-06 00:16:04 +03:00
Andrei Alexandrescu
4bd36016e2 Merge pull request #822 from monarchdodra/unqual
fix issue 8737 Unqual for AA
2012-10-04 11:55:53 -07:00
Hara Kenji
89ee7f43c5 Merge pull request #832 from denis-sh/fix-Issue-8747
Fix Issue 8747 - isAssignable!(int, const(int)) is false
2012-10-04 07:11:47 -07:00
Denis Shelomovskij
8e72e3922e Fix hasElaborateAssign docs typo 2012-10-04 09:50:05 +04:00
Denis Shelomovskij
f30660baa6 Fix Issue 8747 - isAssignable!(int, const(int)) is false 2012-10-04 09:34:29 +04:00
Denis Shelomovskij
4d2f24d04c Improve std.traits unittests
* improve `isAssignable` unittests
* add immutable(S) test to `hasElaborateCopyConstructor`
* add const(S) test to `hasElaborateAssign`
2012-10-04 09:29:53 +04:00
Dicebot
25282b2c84 Current check for additional parents uses "is(typeof())" and thus types given as a parameter are nor fully qualified, nor rejected. Changed this to more generic __trait(compiles) to allow wider usage as same implementation applies. 2012-10-04 01:04:18 +03:00
monarch dodra
dabb0343ba fix issue 8737 Unqual for AA 2012-10-01 11:00:51 +02:00
k-hara
4a05464800 fix Issue 8339 - is(typeof(...)) is reporting true when it's false due to nested function error
Avoid frame access check and disabled default construction in predicate templates.
2012-08-18 17:49:05 +09:00
k-hara
c6dc1711c4 fix template constraints 2012-08-06 01:05:06 +09:00
k-hara
5daf79cbe3 fix Issue 8508 - std.traits.isSomeString no longer works with enums 2012-08-06 01:04:24 +09:00
k-hara
cedddcd23e fix Issue 5939 - Cannot copy std.algorithm.map
Move out Voldemort types to modle level.
2012-07-31 00:30:07 +09:00
jmdavis
9ca21ef2e7 Fix for issue# 8459.
isTrusted and isSafelyCallable have been removed. isSafe now checks for
both @safe and @trusted again (but correctly now).
2012-07-28 17:15:32 -07:00
jmdavis
e169f5dfae Fix for issue# 8362.
"std.traits.isSafe doesn't work with unsafe lamdba functions"
2012-07-27 13:06:58 -07:00
jmdavis
02931eb501 Revert "Merge pull request #664 from denis-sh/add-ArrayTarget-template"
This reverts commit f4d0a49493, reversing
changes made to 3cb69914c5.

The merging of request #664 was accidental, and it should not have been
merged. See https://github.com/D-Programming-Language/phobos/pull/664
for details.
2012-07-11 11:49:28 -07:00
jmdavis
830f3b05a8 Removed tabs and trailing whitespace. 2012-07-10 23:27:21 -07:00
Andrei Alexandrescu
9efd0ed4a4 Merge pull request #643 from gchatelet/traits_arity
Adding arity traits
2012-07-09 12:28:35 -07:00
Guillaume Chatelet
2271113a55 changing uint to size_t 2012-07-09 21:14:55 +02:00
Guillaume Chatelet
75f99e25c7 discarding variadic functions 2012-07-06 22:20:45 +02:00
Denis Shelomovskij
00c0d61403 Replace typeof(<type>.init[0]) with templates
* ArrayTarget (12)
2012-07-06 13:38:06 +04:00
Denis Shelomovskij
564dab300e Add ArrayTarget template 2012-07-06 13:31:48 +04:00
k-hara
9f5c180b66 Disable test for bug 8231 temporarily. 2012-07-02 14:12:03 +09:00
Andrei Alexandrescu
7c1ee23a1e Merge pull request #658 from 9rnsr/parameterTraits
Add ParameterIdentifierTuple and ParameterDefaultValueTuple.
2012-07-01 21:40:52 -07:00
k-hara
c8daf36623 Add ParameterIdentifierTuple and ParameterDefaultValueTuple. 2012-07-01 20:53:50 +09:00
k-hara
2a1012a146 fix Issue 8321 - std.range.put doesn't work with RefCounted output range 2012-07-01 01:27:56 +09:00
Guillaume Chatelet
34e998889a Adding arity traits 2012-06-22 23:26:05 +02:00
k-hara
230f56cf26 Stop using auto ref to distinguish lvalue and rvalue. 2012-06-20 11:04:38 +09:00
Jonathan M Davis
9d0e3f9ca5 Merge pull request #611 from jmdavis/traits
Some tweaks to unsigned.
2012-06-11 02:15:42 -07:00
k-hara
ec773717bb Add author 2012-05-31 19:24:39 +09:00
jmdavis
9b40487759 Some tweaks to unsigned.
unsigned was severely lacking in unit tests. This remedies that. It also
makes its return types more consistent. Previously, in the case of
signed values, the return type was their Unqualed, unsigned counterpart,
whereas in the case of unsigned values, the return type was exactly the
same as the type passed in. Now, it's the Unqualed, unsigned type in all
cases.
2012-05-29 02:14:29 -07:00
jmdavis
73b56a12bb Revert "Changed min()/max() to compare against T.init instead of 0."
This reverts commit b1a9c1cd52.
2012-05-29 01:36:54 -07:00
Jonathan M Davis
c164f04018 Merge pull request #592 from wfunction/master
Changed min()/max() to use T.init instead of 0
2012-05-28 18:51:55 -07:00
Jonathan M Davis
5d423fecc8 Merge pull request #555 from klickverbot/func-attr
std.traits: Add SetFunctionAttributes.
2012-05-28 13:53:37 -07:00
Lambert
b1a9c1cd52 Changed min()/max() to compare against T.init instead of 0. 2012-05-26 15:19:14 -07:00
k-hara
93da97d514 typeof(null) is not any reference types in std.traits module (string, array, associative array, pointer, class, and interface) 2012-05-23 12:49:57 +09:00
Walter Bright
ac143b63fd Merge pull request #537 from 9rnsr/fix7909
Issue 7909 - to!enum(string) and to!string(enum) break when enum is integral
2012-05-21 22:32:59 -07:00
Andrei Alexandrescu
21c21ad0ec Merge pull request #517 from deadalnix/isbuiltin
Add isBuiltin to detect builtin types.
2012-05-20 15:31:25 -07:00
Brad Roberts
a47332ca0d Merge pull request #540 from 9rnsr/fix7919
Issue 7919 - Sample code works on GDC but fails with DMD
2012-05-12 10:32:26 -07:00