Commit graph

421 commits

Author SHA1 Message Date
safety0ff
409fe4f8f4 std.array.replaceInPlace: Don't call remove to remove nothing 2014-06-17 12:01:54 -04:00
safety0ff
6ff3378c79 Add unittests bug #12889 2014-06-16 19:42:30 -04:00
k-hara
5b39ab253c Make side effect on strongly pure function call 2014-06-14 23:17:44 +09:00
monarchdodra
452eab0e03 Sanitize Appender constraints a bit. 2014-05-22 00:41:06 +02:00
monarchdodra
d609bd332f Sed "@safe pure nothrow" 2014-05-06 08:21:13 +02:00
Andrej Mitrovic
65baedc7b1 Add a disabled clear() method to Appender in the else branch to avoid UFCS hijacking. 2014-05-02 19:17:28 +02:00
Andrej Mitrovic
11d82758ba Strip spaces. 2014-05-02 12:38:12 +02:00
monarchdodra
3ff3fdfba3 Use static blockAttribute in Appender 2014-04-22 21:20:45 +02:00
monarchdodra
dacaa16069 Fix appender's extend 2014-04-12 14:59:11 +02:00
monarch dodra
8e66abb2fc Fix "use up capacity" in Appender 2014-04-02 18:26:32 +02:00
monarchdodra
6ea7bf2fa7 Fix Appender constructor 2014-03-31 20:21:15 +02:00
Andrei Alexandrescu
cecd745cef Merge pull request #2015 from monarchdodra/emplaceQual
Improve emplaceRef for qualified construction
2014-03-26 18:03:39 -07:00
Per Nordlöw
d701f90275 Issue 3882: Use cast(void) instead of value capture 2014-03-18 23:50:18 +01:00
monarchdodra
59ad77ad9f Improve emplaceRef for qualified construction 2014-03-17 22:48:30 +01:00
Andrei Alexandrescu
be185a4de7 Merge pull request #1975 from nordlow/warn-unused-returns
Issue 3882: Add warning for unused returns of strictly pure function calls
2014-03-09 12:10:44 -07:00
Per Nordlöw
275db682a5 Issue 3882: Explicitly capture return values for strictly pure functions returning non-void 2014-03-09 18:55:07 +01:00
Peter Alexander
8d9479c3a4 Fix Issue 12315 - array at compile-time with all types
Problem was that `emplaceRef` calls `memcpy` for some types, which is unsafe and unavailable at compile time.

https://d.puremagic.com/issues/show_bug.cgi?id=12315
2014-03-09 14:08:32 +00:00
Yazan S. Dabain
bda0f5a578 [Trivial] Fix documentation typos in std.array 2014-02-28 10:46:58 +02:00
monarchdodra
c7d98fd96d Remove useless lambda 2014-02-18 22:58:28 +01:00
monarchdodra
8f71c4e59a Cleanup emplace useage for emplaceRef 2014-02-16 17:04:34 +01:00
Andrej Mitrovic
7330607afe Merge pull request #1865 from CyberShadow/std-array-join-const
std.array: Allow joining constant arrays
2014-02-16 01:11:59 +01:00
monarch dodra
b16a3ed609 Add note about CTFE/pure issue 2014-02-13 22:19:18 +01:00
monarchdodra
3e97991dc7 Fixup [un|minimally]InitializedArray
Solves:
* http://d.puremagic.com/issues/show_bug.cgi?id=9803 : minimallyInitializedArray fails past "1D" depth
* http://d.puremagic.com/issues/show_bug.cgi?id=10637 : minimallyInitializedArray: postblit on non-initialized
* http://d.puremagic.com/issues/show_bug.cgi?id=10847 : uninitializedArray accepts arguments which make it fail internally

Improvements also include:
* Documented as nothrow, and weakly pure.
* Works with 0 args (returns an empty slice).
* All args are pre-emptivelly changed to size_t, to avoid template over-instantiation.
2014-02-13 22:19:18 +01:00
k-hara
b391b2ec9f Convert to new alias syntax 2014-02-11 15:27:05 +09:00
Vladimir Panteleev
ce7d4ed26a std.array: Allow joining constant arrays 2014-01-16 14:33:22 +00:00
Daniel Murphy
19ee4d3851 Merge pull request #1843 from monarchdodra/whiteTrim
Remove trailing white and tabs
2014-01-12 05:14:42 -08:00
Brad Anderson
515de4f2a2 Document that replaceSlice returns a new array 2014-01-10 21:05:12 -07:00
monarchdodra
44fe3d88f7 Remove tabs 2014-01-08 08:37:52 +01:00
Andrei Alexandrescu
06352bc88f Fix Issue 6730 2013-12-29 14:26:32 -08:00
Tomoya Tanjo
d9dc269747 Make std.array.insertInPlace @safe for some cases 2013-12-16 20:56:23 +09:00
Daniel Murphy
1818d190b5 More implicit array to bool 2013-12-15 19:55:34 +11:00
Daniel Murphy
522b551ccf Don't call dup on a type 2013-11-18 22:09:27 +11:00
Jonathan M Davis
d408470f8f Merge pull request #1502 from monarchdodra/splitterPred
Fix splitter!pred and splitter(string)
2013-11-17 18:10:03 -08:00
monarch dodra
ec5e25b796 Merge pull request #1695 from rainers/issue_11528
fix issue 11528: crashes or undefined behaviour of appender's first allocation
2013-11-17 04:13:50 -08:00
Rainer Schuetze
cc548fe9cb fix appenderNewCapacity for curLen == 0, start with minimum of 8. 2013-11-17 12:11:12 +01:00
monarchdodra
4583a87031 Correct english in documentation 2013-11-14 21:53:11 +01:00
monarchdodra
f0a7d82e30 more splitter unittests 2013-11-13 22:36:39 +01:00
monarchdodra
7c79bfa677 Fix remaining splitter issues 2013-11-13 22:22:05 +01:00
monarchdodra
60a54e7af5 Fixes splitter!pred and splitter(string) 2013-11-13 22:22:05 +01:00
monarchdodra
b207491613 fix reg in appender 2013-11-08 20:47:55 +01:00
David Nadlinger
52c6ecf427 Merge pull request #1655 from monarchdodra/arrayEmplace
Remove conditional emplace call
2013-10-29 08:18:38 -07:00
monarch dodra
99100cf9ac Remove explicit pure 2013-10-29 10:58:40 +01:00
Andrei Alexandrescu
f9712aae6f Merge pull request #1529 from monarchdodra/appenderEmplace
Fix appender form elaborate assign types
2013-10-26 20:31:49 -07:00
Andrej Mitrovic
6c794801c4 Merge pull request #1477 from monarchdodra/splitwhite2
std.array.split Unicode correctness
2013-10-24 14:25:12 -07:00
Andrej Mitrovic
693ccb171d Merge pull request #1410 from monarchdodra/AppenderCapacity
Appender.reserve: Overzealous and wrong
2013-10-23 18:33:24 -07:00
monarchdodra
e5c936adfb Remove conditional emplace call 2013-10-20 16:04:09 +02:00
David Nadlinger
3253eb6d3b Merge pull request #1528 from monarchdodra/arrayEmplaceFixup
Fixup unittest following emplace fix
2013-10-08 05:38:55 -07:00
unknown
4b2390eb0b Making split unicode correct
Also marked as safe, but not pure (because of the foreach body)
2013-10-08 08:50:29 +02:00
David Nadlinger
99f05dad4e Merge pull request #1575 from tom-tan/safe-unittest-array-minimallyInitializedArray
Mark the unittest for std.array.minimallyInitializedArray as @safe
2013-10-02 09:21:56 -07:00
monarch dodra
55ec22276b Merge pull request #1576 from tom-tan/safe-pure-nothrow-array-split
Mark std.array.split and splitter as @safe, pure and nothrow
2013-10-02 04:33:58 -07:00