Commit graph

558 commits

Author SHA1 Message Date
Jack Stouffer
118f2d7733 Improve some docs in std.traits 2017-03-18 16:41:18 -04:00
sprinkle131313
d79da1d3ca Issue 16485 - Add trait for testing if a member is static. 2017-03-04 00:09:32 -05:00
Sebastian Wilzbach
a2c6398332 Automatically add spaces to binary operators (==)
command:

sed -E "s/([[:alnum:]]) == ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]])== ([[:alnum:]])/\1 == \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) ==([[:alnum:]])/\1 == \2/g" -i **/*.d
2017-02-23 00:57:47 +01:00
Sebastian Wilzbach
425ab667a3 Automatically set the range style from a..b -> a .. b
Commands:

sed -E "s/([[:alnum:]])[.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]])[.][.] ([[:alnum:]])/\1 .. \2/g" -i **/*.d
sed -E "s/([[:alnum:]]) [.][.]([[:alnum:]])/\1 .. \2/g" -i **/*.d
2017-02-22 05:37:31 +01:00
The Dlang Bot
166ae7dde3 Merge pull request #5170 from wilzbach/fix-17196
Issue 17196 - [Reg 2.074] isUnsigned!bool now true
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2017-02-21 12:02:20 +01:00
Sebastian Wilzbach
76dd6fe33b Issue 17195 - [Reg 2.074] isFloatingPoint!cfloat is now true 2017-02-21 06:30:19 +01:00
Sebastian Wilzbach
58c91e1a2c Issue 17196 - [Reg 2.074] isUnsigned!bool now true 2017-02-21 06:09:06 +01:00
Walter Bright
771467b9e5 [scope] add some 'scope' support to std.traits 2017-02-04 02:11:00 -08:00
Per Nordlöw
956ef765c6 More alias-this tests and move some of the other-alias tests to undocumented unittests 2017-01-25 19:20:00 +01:00
Per Nordlöw
e685232e3b More negative asserts for alias-this-types 2017-01-25 19:12:18 +01:00
Per Nordlöw
284784a3c4 Cleanup function doc comments 2017-01-25 19:07:50 +01:00
Per Nordlöw
53f011cb08 Restrict isScalarType to non-aggregate types 2017-01-25 19:07:50 +01:00
Per Nordlöw
2c21169b5b Restrict isNumeric to not include char, wchar and dchar 2017-01-25 19:07:50 +01:00
Per Nordlöw
e975ad970d Revert compacter definition of isFinalClass and add more tests for both isAbstractClass and isFinalClass 2017-01-25 19:07:50 +01:00
Per Nordlöw
289b8d219a Revert compacter definition of isAbstractClass and add more tests 2017-01-25 19:07:50 +01:00
Per Nordlöw
78783f1527 Revert compacter definition of isFinalFunction 2017-01-25 19:07:50 +01:00
Per Nordlöw
1e7a6a18fc Revert compacter definition of isAbstractFunction 2017-01-25 19:07:50 +01:00
Per Nordlöw
f9947f3ffb More coverage in unittest for isScalarType 2017-01-25 19:07:50 +01:00
Per Nordlöw
93e302ba98 Compacter definition of isSigned including extra unittests 2017-01-25 19:07:50 +01:00
Per Nordlöw
51fbf1765a Compacter definition of of isScalarType including extra unittest that passes old and a new 2017-01-25 19:07:50 +01:00
Per Nordlöw
742024dc3d Compacter definition of isFinalFunction 2017-01-25 19:07:50 +01:00
Per Nordlöw
5239d032ff Compacter definition of isFinalClass 2017-01-25 19:07:50 +01:00
Per Nordlöw
155a701f1c Compacter definition of isAbstractFunction 2017-01-25 19:07:50 +01:00
Per Nordlöw
a07517abae Use builtin trait isArithmetic in isNumeric 2017-01-25 19:07:50 +01:00
Per Nordlöw
5a4e4622a9 Compacter definition of isAbstractClass 2017-01-25 19:07:49 +01:00
Per Nordlöw
ba75a3b1c9 Use builtin trait isFloating in isFloatingPoint 2017-01-25 19:07:49 +01:00
Per Nordlöw
72b2c24649 Use builtin trait isUnsigned 2017-01-25 19:07:49 +01:00
Per Nordlöw
d53ee9fc5c Add note about using builtin trait isScalar 2017-01-25 19:07:49 +01:00
Per Nordlöw
5ba527335e Use builtin trait isAssociativeArray 2017-01-25 19:07:49 +01:00
Per Nordlöw
3d79925e03 Use builtin trait isStaticArray 2017-01-25 19:07:49 +01:00
Nick Treleaven
8ada2b7a50 Tweak std.traits function-related docs
Also fix order of constraint tests.
2017-01-13 07:28:14 +01:00
Adam D. Ruppe
5febcef466 better workaround for issue 16653, fix ketmar comment 2017-01-06 10:11:41 -05:00
Sebastian Wilzbach
970dff3bef std.traits: hasFunctionAttributes 2017-01-04 15:26:46 +01:00
somzzz
48398dbd0f fix issue 16653 2016-12-20 04:27:50 -08:00
Andrei Alexandrescu
3fec190b7f Merge pull request #4916 from Darredevil/issue-16611
Fix Issue 16611 - 'Unrecognized type const(void)' error for std.trait…
2016-11-22 16:36:12 -05:00
Alexandru Razvan Caciulescu
a636bb6bb0 Fix Issue 16611 - 'Unrecognized type const(void)' error for std.traits.fullyQualifiedName 2016-11-22 04:29:33 +02:00
Martin Nowak
26a6857e7b Merge pull request #4889 from MartinNowak/merge_stable
Merge remote-tracking branch 'upstream/stable' into merge_stable
2016-11-21 00:19:08 +01:00
Martin Nowak
0f5b131d0a Merge remote-tracking branch 'upstream/stable' into merge_stable
Conflicts:
        std/traits.d
2016-11-05 12:15:09 +01:00
Ryan Roden-Corrent
10cd84a5c0 Improve isConvertibleToString docs.
Clarify that it works for enums and add more unittest examples.
2016-10-30 19:02:22 -04:00
Ryan Roden-Corrent
5f346e49dc Document isConvertibleToString.
It was public but undocumented.
2016-10-30 18:57:12 -04:00
Ryan Roden-Corrent
0a685f1daf Ensure std.file.exists(StringEnum.name) compiles.
A string-typed enum passes isSomeString but not isConvertibleToString.
Because isConvertibleToString is used as a template constraint for
std.file.exists, it could not be passed a string-typed enum.

Resolves #16573.
2016-10-30 18:57:11 -04:00
Jack Stouffer
d999c773a1 Merge pull request #4419 from tsbockman/more_traits
Add `Promoted` to `std.traits`.
2016-10-25 18:04:26 +01:00
Steven Schveighoffer
c5d94717b9 Merge pull request #4862 from MartinNowak/parameter_defaults_cruft
remove ParameterDefaults cruft
2016-10-17 08:28:39 -04:00
Martin Nowak
f783d975a2 fix Issue 16582 - ParameterDefaults fails w/ scope parameter
- workaround scope escape error to get default parameter
- would require a working `return scope` for a proper implementation
2016-10-16 01:36:27 +02:00
Martin Nowak
c5c1360259 remove unused branch
- variadic template parameters cannot be a function (always need to use func[0])
2016-10-15 16:49:39 +02:00
Martin Nowak
ac7cc674c1 no need to use parameter names to get defaults 2016-10-15 16:49:39 +02:00
Martin Nowak
e46cc8ea25 remove spurious x identifier in IsExp
- gets parsed as is(Type Identifier) but an alias identifier isn't needed
- fixup of ee683ae79f (#2624)
2016-10-15 16:30:26 +02:00
tsbockman
8711a1134d Add Promoted to std.traits. 2016-10-10 12:31:27 -07:00
Walter Bright
55e5737525 add 'scope' to opApply() parameter 2016-09-14 19:41:41 -07:00
Walter Bright
63811e9aeb replace binary literals with hex 2016-09-13 15:32:50 -07:00