Commit graph

66 commits

Author SHA1 Message Date
Alexandru Razvan Caciulescu
946a46774c Fix Issue 8087 - Improve clarity of std.algorithm documentation 2016-10-31 08:17:06 +02:00
Steven Schveighoffer
ea3f446a98 Fix issue where initializeAll does not properly use
TypeInfo_StaticArray.initializer. Found in issue 16394
2016-08-18 17:29:29 -04:00
Jack Stouffer
268fa2538d Add some const and immutable to std.algorithm 2016-07-01 17:11:09 -04:00
Andrei Alexandrescu
ac9c93cb9e Merge pull request #4315 from wilzbach/algorithms_private_cleanup
std.algorithm: set accidentally exposed methods to private
2016-06-18 04:27:58 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Sebastian Wilzbach
0c100a7b5a std.algorithm: set accidentally exposed methods to private 2016-06-04 16:13:07 +02:00
Steven Schveighoffer
e216c10b2c Merge pull request #4383 from JackStouffer/issue16073
Partial Fix for Issue 16073
2016-06-02 14:30:24 -04:00
Jack Stouffer
3a1db06f41 [Issue 16073] Fix incorrect uses of random access range primitives in std.algorithm.mutation 2016-06-02 09:31:06 -04:00
Sebastian Wilzbach
1d34a121e9 apply all-man braces in Phobos
// find common cases
sed -E "s/^(\s*)((if|static if|for|foreach|foreach_reverse|while|unittest|switch|else|version).*)\s*\{$/\1\2\n\1{/" -i **/*.d
// catch else-if
sed -E "s/^(\s*)} (else static if| if|else if|else)(.*)\s*\{$/\1}\n\1\2\3\n\1{/" -i **/*.d
// remove created trailing whitespace
sed -i 's/[ \t]*$//' **/*.d
2016-05-31 13:07:53 +02:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
anonymous
ef9722928c XREF_PACK_NAMED -> REF_ALTTEXT (sed)
Done by:

arg='\s*([^(),]*)'
from='\$\(XREF_PACK_NAMED\s'$arg','$arg','$arg','$arg'\)'
to='$(REF_ALTTEXT \4, \3, std,\1,\2)'
(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r "s/$from/$to/g"
2016-05-27 21:32:46 +02:00
anonymous
764caefa36 XREF -> REF (sed)
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Sebastian Wilzbach
614294cd70 remove whitespace in ddoc output of std/algorithm 2016-05-25 03:57:01 +02:00
Vladimir Panteleev
38a6370788 Merge pull request #4303 from wilzbach/mref_phobos
use mref macro instead of link2
2016-05-24 03:12:08 +03:00
Sebastian Wilzbach
89a2dd5f11 use mref macro instead of link2 2016-05-16 03:30:08 +03:00
Sebastian Wilzbach
b8f17e2531 std.algorithms: document public methods 2016-05-12 17:53:03 +03:00
anonymous
4a28601977 rewrap 2016-04-30 20:30:16 +02:00
anonymous
f46e52b4f2 documentation: fix requirements of remove
All overloads require a bidirectional range with lvalue elements.
2016-04-30 20:26:34 +02:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
Ilya Yaroshenko
ddf8268d42 UFCS for moveAt, moveFront, moveBack 2016-04-09 09:28:14 +02:00
Sebastian Wilzbach
b05f4afe1c change usage of swapAt to UFCS 2016-04-08 01:18:45 +03:00
Sebastian Wilzbach
c373792434 document std.algorithm.mutation: swapAt 2016-04-08 01:18:36 +03:00
Ilya Yaroshenko
95ea08d50b fix imports 2 2016-04-07 15:54:04 +02:00
Nick Treleaven
00032f65ad Improve docs for std.algorithm.mutation.move & related functions
Clarify that `move` doesn't always do a destructive copy.
Improve std.algorithm.mutation.move, moveEmplace examples.
Make moveAll, moveSome description easier to read.
Fix parameter name typos source -> src, tgt.
2016-03-29 12:35:04 +01:00
Steven Schveighoffer
b0acb7a394 Fix remaining import deprecation messages 2016-02-22 16:03:12 -05:00
Andrei Alexandrescu
718208dfc5 Merge pull request #3846 from aG0aep6G/TypeInfo.initializer
TypeInfo.init -> TypeInfo.initializer
2016-01-12 11:40:47 -05:00
Jack Applegame
1cdec1f5be fix remove docs 2016-01-03 23:58:37 +03:00
anonymous
933aa8e30d TypeInfo.init -> TypeInfo.initializer 2015-11-30 21:20:46 +01:00
Dragos Carp
75cbbef0ab Add asserts for the "compiles" tests 2015-11-16 03:04:07 +01:00
Dragos Carp
eb293b5063 Fix issue 15320 2015-11-13 03:45:29 +01:00
Brian Schott
67c95e6de2 Merge pull request #3715 from dcarp/AliasSeq
Rename obsolete TypeTuple to AliasSeq
2015-10-16 20:59:56 -07:00
Martin Nowak
f127643ed7 Merge remote-tracking branch 'upstream/stable' into merge_stable 2015-10-14 15:29:12 +02:00
Martin Nowak
96bc6da667 missing docs for moveEmplace 2015-10-14 13:56:37 +02:00
Dragos Carp
d698887729 Remove obsolete TypeTuple references
Replace following names:
std.typetuple      -> std.meta
TypeTuple          -> AliasSeq
ParameterTypeTuple -> Parameters
FieldTypeTuple     -> Fields

std.traits requires more work than search/replace and is left unchanged.
2015-10-13 20:37:44 +02:00
Dmitry Olshansky
8aca364e7e Merge pull request #3652 from JackStouffer/docs
Fixed some docs in std.algorithm
2015-10-05 20:14:01 +03:00
Jack Stouffer
3706811991 fixed docs 2015-10-05 09:16:19 -04:00
Peter Alexander
1e7246b201 Fix Issue 14817 - std.algorithm.copy/std.file.copy conflict
https://github.com/D-Programming-Language/phobos/pull/2799 introduced a regression, which prevented module that imported both std.algorithm and std.file to use unqualified calls to copy(string, string). The regression was caused by the removal of template constraints, which were preventing the std.algorithm copy from being considered for overload resolution.

std.algorithm.copy has two paths: an path for array copies, and a path for all other copies. Previously they were forked using static if inside function. Now the decision is made using template constraints.
2015-09-12 14:10:40 +03:00
Dmitry Olshansky
94f718e5c6 Merge pull request #3531 from MartinNowak/moveAllAssert
use assert instead of enforce for moveAll
2015-08-07 17:23:44 +03:00
Martin Nowak
901908ec7f remove workaround for invalid bug 14878
- have to use `(T t) @safe {}`

- turns out that T in `(T) @safe {}` is the parameter
  name of a polymorphic lambda not the parameter type
  of a function literal
2015-08-07 01:03:22 +02:00
Martin Nowak
81ca4a8cc5 use assert instead of enforce for moveAll
- it's a programming error to call the function w/o
  knowing if tgt can accomodate all of src
- for cases where it cannot be known in advance
  there is moveSome which will stop when either
  range is exhausted
- allows to make moveAll nothrow @nogc depending
  on the destructor of T
2015-08-07 00:30:48 +02:00
Martin Nowak
3ccea802ba test moveAll with input range 2015-08-06 13:38:31 +02:00
Martin Nowak
d4d301b35c add moveEmplaceAll and moveEmplaceSome variant
- similar to their moveAll and moveSome counterparts
  but assume that target is an uninitialized range
2015-08-06 13:30:10 +02:00
Martin Nowak
980351894b make move and moveEmplace attribute correct
- moveEmplace is unsafe (@system)
- move inherits attributes from T's destructor
2015-08-06 13:30:10 +02:00
Martin Nowak
aefe7e5557 implement moveEmplace
- combined move and emplace

- moves a value and emplaces it into an
  uninitialized value of the same type

- more efficient than init + move
2015-08-06 11:58:31 +02:00
Peter Alexander
1f0f8ef772 Fix Issue 13650 - Rebased 2015-06-29 22:17:09 +01:00
anonymous
b28962635f fix package XREFs
Also add escaping underscores in some places, and rewrap to 80 columns
where touching anyway.
2015-06-15 22:30:41 +02:00
Walter Bright
d9a9826e55 Revert "Introducing std.meta package" 2015-05-06 14:36:45 -07:00
Dicebot
82f54a38d3 TypeTuple -> MetaList inside Phobos 2015-05-05 22:22:11 +03:00
Dicebot
73f773838d import std.typetuple -> import std.meta 2015-05-05 22:22:10 +03:00
Martin Nowak
1e19a4f713 use typeid(T).init() to reset moved value 2015-04-20 00:53:04 +02:00