andralex
017c1e847d
bugzilla 3785 + improvements
2011-06-06 13:31:09 -05:00
k-hara
5d8f67b560
Get correct function type for comparing.
2011-06-05 14:08:30 +09:00
dsimcha
325a8fe64a
Special-case Rebindable in std.traits.hasAliasing and std.traits.hasUnsharedAliasing, so that a Rebindable!(immutable SomeObject) can be passed as a message between threads, etc.
2011-04-12 20:40:10 -04:00
dsimcha
3edf3bf1b7
Bug 5780: [patch] std.traits.hasIndirections incorrectly handles static arrays
2011-04-12 19:11:01 -04:00
Andrei Alexandrescu
1083bd4e7b
One pass through std.range and friends
...
* Made emplace faster and replaced calls to it to also make them faster.
* Replaced phobos.d in posix.mak with index.d.
* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.
* Improved documentation target in posix.mak (target dir automatically created).
* Added nice documentation table and cheat sheet at the top of std.algorithm.
* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.
* Added more constraints to functions in std.algorithm (still work in progress).
* Improved error message in std.algorithm.sort in case of failure to sort.
* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).
* Fixed documentation bugs and insufficiencies in std.range (still more to do).
* Improved speed of walkLength.
* Simplified retro.
* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).
* Added roundRobin to std.range, which as a perk simplified radial.
* Added takeOne and takeNone to std.range.
* Added unsigned to std.traits.
2011-02-27 12:38:49 -06:00
Walter Bright
046e1b36db
add source links
2011-02-06 15:46:50 -08:00
Andrei Alexandrescu
81a4a4034a
Fix for issue 3272
2011-01-23 21:46:19 -06:00
Andrei Alexandrescu
3d865b35b6
Fix for issue 4942
2011-01-22 19:17:40 +00:00
Kenji Hara
84b03988c5
Fixed the fail of dmd test.
2010-12-25 12:37:48 +00:00
Kenji Hara
e0737dee46
bugzilla 5371, ambiguous stringnize of class with alias this
2010-12-25 00:42:35 +00:00
Brad Roberts
f368104f37
A bunch of 64 bit fixes, including disabling tests that don't pass
2010-12-23 20:39:22 +00:00
Don Clugston
84477a5d3e
Move Boost copyright declaration from ddoc to normal comment. Fixes ugly ddoc output.
2010-11-24 19:34:47 +00:00
Shin Fujishiro
af1fb0b618
Constrain swap() with isMutable!T so that const objects should not be swapped. std.traits.isMutable is undocumented for now.
2010-11-18 21:45:18 +00:00
Andrei Alexandrescu
5a64b47d10
Fix for Bugzilla 2073
2010-09-26 04:35:12 +00:00
SHOO
7cd2e0339e
std.datetime: Added benchmark
...
This function came from std.date.
But now, benchmark returns Ticks[N] and don't use result argument.
I removed need to use GC for by doing it in this way.
2010-09-18 11:04:14 +00:00
David Simcha
e51eeec660
Bug 4882: std.traits hasUnsharedAliasing does not work for function type, plus unlisted bug: interfaces not considered to have indirection, aliasing, etc.
2010-09-17 23:43:54 +00:00
David Simcha
f252d5e611
Support pointers to structs in std.range.put().
2010-09-15 22:41:50 +00:00
David Simcha
8aad9c0e38
Bug 4834: Implicit sharing via delegates in std.concurrency
2010-09-07 23:05:25 +00:00
Shin Fujishiro
7a003d8cff
traits: Added EnumMembers for cleaning up std.conv to!enum.
2010-09-05 01:39:56 +00:00
David Simcha
817dc10f95
Fix hasElaborateCopyConstructor and hasElaborateAssign to look at whole representation. Also make std.range use hasElaborateCopyConstructor instead of rolling its own.
2010-09-04 19:35:27 +00:00
David Simcha
f31b036712
Associative arrays have raw and local aliasing too.
2010-09-04 15:48:36 +00:00
David Simcha
7923b82cdd
Associative arrays have indirections.
2010-09-04 15:35:32 +00:00
David Simcha
fc8a926290
std.traits: Add isAssignable.
2010-08-29 00:05:56 +00:00
Walter Bright
b8ce58ccd1
detab sources
2010-08-23 02:14:45 +00:00
SHOO
7ea8f5298a
Removed concept.
...
for template function literals.
isCallable does not match template function literals.
2010-08-21 09:42:39 +00:00
SHOO
cedd0339f6
Fix document
2010-08-21 09:21:41 +00:00
SHOO
4fffc6901b
Added isSafe, isUnsafe
...
isSafe!(func) checks the func that is @safe or @trusted
isUnsafe!(func) checks the func that is @system
2010-08-21 09:01:33 +00:00
David Simcha
db2c820045
Added isIterable, ForeachType to std.traits in preparation for improvements to std.array.array.
2010-08-19 00:48:56 +00:00
David Simcha
836922d87a
Bug 4292: CommonType fails for singular alias values.
2010-08-15 15:05:02 +00:00
David Simcha
06c166e10a
Fix several related bugs in std.math.pow(), massively improve unittests.
2010-08-12 02:00:17 +00:00
Andrei Alexandrescu
3e36278eb3
Added minor unittest
2010-07-28 07:58:10 +00:00
Andrei Alexandrescu
37ab6c65f3
Added hasMember
2010-07-14 01:17:00 +00:00
Andrei Alexandrescu
e59dcea197
Defined hasElaborateCopyConstructor and hasElaborateAssign
2010-07-09 04:19:15 +00:00
Andrei Alexandrescu
8b10af313b
Implemented hasIndirections
2010-07-04 21:49:57 +00:00
Sean Kelly
643c57f84b
Bug 2627: std.traits.hasAliasing reports true for static arrays.
...
Applied the same change to std.traits.hasLocalAliasing.
2010-07-02 18:54:51 +00:00
David Simcha
f45262c478
Bug 2627: std.traits.hasAliasing reports true for static arrays. Also unlisted bug in std.traits.isAssociativeArray.
2010-07-01 03:26:52 +00:00
Sean Kelly
114c40a947
Added hasLocalAliasing!T as an analog of hasAliasing!T which evaluates to false for shared T as well as immutable T. Gratuitous code duplication, but it keeps the two template routines logically separate, which is nice. This is being added to support static analysis of parameters in std.concurrency.
2010-06-22 22:35:06 +00:00
Don Clugston
80edeca151
Two more B stings.
2010-06-21 20:22:18 +00:00
Shin Fujishiro
251d447850
std.traits: Added workaround for compiler bug 4333.
...
Added unittests for regression bug 4312 (caused by bug 4333). This regression bug is just workarounded, not fixed, so I don't mark it as fixed. The bug 4312 will be closed when compiler bug 4217 or 4333 is fixed (these are blockers against this regression 4312).
Made some templates to print error message on failure, rather than just failing instantiation.
2010-06-16 22:41:46 +00:00
Shin Fujishiro
80716f3150
Restored an assertion commented out in r1643. It was my local problem (related to bug 3779 and 4298) and linker error does not occur for other people.
...
The other assertion commented out in the same changeset is not restored because its validity depends on bug 4237.
2010-06-16 00:27:55 +00:00
Shin Fujishiro
db2a794961
Commented out an assertion. For some reason it caused a link error about __dollar on unittest.
2010-06-14 15:36:29 +00:00
Andrei Alexandrescu
42bdc4ae67
Moved static asserts at module level into unittests. This reduces the size of many client object files by up to 20x.
2010-06-09 19:34:20 +00:00
Andrei Alexandrescu
54426817e6
typo
2010-06-06 17:50:42 +00:00
Shin Fujishiro
1b18d516cc
Added code for bugzilla 3909: toDelegate handles only a tiny subset of function pointer types.
...
The bug is not completely fixed. toDelegate() still does not work well with @safe function pointers... because toDelegate() is unsafe. And variadic arguments are ignored.
2010-05-26 14:22:06 +00:00
Shin Fujishiro
5a05de6a48
Fixed bugzilla 4219: hasAliasing does not care about immutable.
2010-05-24 04:27:16 +00:00
Shin Fujishiro
1e204c9b9a
Fixed covariance check (function safety).
2010-05-23 01:07:22 +00:00
Shin Fujishiro
19166286a7
Added BlackHole and WhiteHole.
2010-05-23 00:35:48 +00:00
Shin Fujishiro
163bd6fe4d
Added AutoImplement to std.typecons.
2010-05-22 00:10:16 +00:00
Shin Fujishiro
9efdec1625
workaround for strange corruption of args[0]
2010-05-22 00:10:01 +00:00
Shin Fujishiro
edd2d593fc
Added MemberFunctionsTuple and isCovariantWith to std.traits.
2010-05-19 11:46:51 +00:00