Commit graph

823 commits

Author SHA1 Message Date
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
k-hara
52462bec6e fix Issue 7909 - to!(enum)(string) and to!(string)(enum) break when enum is integral 2012-05-12 20:06:29 +09:00
David Nadlinger
477bc02658 Removed default parameters for SetFunctionAttributes.
They were hardly useful and deemed potentially confusing, because not specifying them did not mean that no change should occur, which would arguably be the expected behavior.
2012-05-11 16:27:14 +02:00
David Nadlinger
9c32cd71e2 Clarified that SetFunctionAttributes accepts a combination of FunctionAttributes. 2012-05-11 16:27:02 +02:00
David Nadlinger
c1d3d745c2 Added "System" linkage to SetFunctionAttributes.
It is not clear whether the accepted linkage types should be restricted at all; currently, the set of acceptable names is strictly specified in the grammar, but it is conceivable that other compiler implementations provide additional types, e.g. extern(Java), which SetFunctionAttributes could work with as well without any required changes. However, without the restriction, mistyped arguments would potentially give users a confusing error message in string mixin code…
2012-05-11 16:13:44 +02:00
David Nadlinger
26c7cb27e9 Added SetFunctionAttributes. 2012-05-11 16:06:46 +02:00
Denis Shelomovskij
a6e38e3472 Fix Issue 8037 - hasElaborateDestructor is false for non-zero-length static array of structs with elaborate destructor 2012-05-06 19:10:24 +04:00
Andrej Mitrovic
26de06e404 Move templates below OriginalType 2012-04-19 04:08:41 +02:00
Andrej Mitrovic
41fc17ee6b Change unittest and add static assert to examples. 2012-04-19 03:48:07 +02:00
Andrej Mitrovic
a7148b3bb5 Merge remote-tracking branch 'upstream/master' into KeyTypeValueType 2012-04-19 03:43:06 +02:00
deadalnix
5aba76a9ad Merge branch 'master' of git://github.com/D-Programming-Language/phobos into isbuiltin 2012-04-18 12:58:44 +02:00
k-hara
e3cfaeb005 fix Issue 7919 - Sample code works on GDC but fails with DMD 2012-04-17 18:01:04 +09:00
Hara Kenji
9b8abdbaa4 Merge pull request #476 from jmaschme/fixModuleNameWithNoPackage
Modified moduleName trait to only include the package name if it is valid
2012-04-15 06:16:29 -07:00
Hara Kenji
da44d0b006 Merge pull request #525 from denis-sh/remove-workarounds-for-2986
Removed workarounds for resolved bug 2986
2012-04-15 05:03:47 -07:00
Hara Kenji
e666b6c806 Merge pull request #526 from denis-sh/fix-pointerTarget-name
Capitalize `pointerTarget`'s first letter
2012-04-15 01:05:24 -07:00
Denis Shelomovskij
20420759cb Capitalize pointerTarget's first letter 2012-04-07 16:40:23 +04:00
Denis Shelomovskij
dc6c8c6c93 Removed workarounds for resolved bug 2986 2012-04-07 14:20:38 +04:00
Denis Shelomovskij
0f9ecb9044 Small improvements not changing the functionality
* get rid of `determineVariadicity` private function
* make `isIterable` template shorter
2012-04-07 14:05:00 +04:00
deadalnix
5969d63723 Renaming of isBuiltin to isBasicType and addition of isScalarType 2012-04-04 14:23:51 +02:00
deadalnix
feb2c30a83 Add isBuiltin to detect builtin types. 2012-04-03 21:08:20 +02:00
k-hara
a5cff8017e Use SomethingTypeOf in isSomeThing templates 2012-03-12 14:13:43 +09:00
k-hara
196fa86364 Add SomethingTypeOf templates 2012-03-12 14:13:42 +09:00
k-hara
be181743c1 isMutable should return false for inout type 2012-03-12 14:13:40 +09:00
k-hara
bf7f4e5f1c ForeachType should support inout array type 2012-03-12 14:13:39 +09:00
John Maschmeyer
afb1667f78 Modified moduleName trait to only include the package name if it is valid 2012-03-03 12:41:34 -06:00
Andrej Mitrovic
c1a3c42ade remove constraint 2012-02-24 02:37:44 +01:00
Andrej Mitrovic
0761569e58 space fixes 2012-02-22 19:35:30 +01:00
Andrej Mitrovic
3826849227 Simpler implementation. 2012-02-22 19:34:34 +01:00