Commit graph

9123 commits

Author SHA1 Message Date
Martin Nowak
f3f58c12d9 use encode for byUTF 2015-08-18 13:22:19 +02:00
Martin Nowak
c7952393ce add UseReplacementDchar to encode
- also add missing encode(dchar[1], dchar)
  overload for generic code
2015-08-18 13:22:14 +02:00
Martin Nowak
679ca93fc7 add alias for Flag!"useReplacementDchar" 2015-08-18 13:19:20 +02:00
Martin Nowak
9b070c01d0 test corner case for wchar decoding 2015-08-18 13:19:20 +02:00
Martin Nowak
152e1fab3d pop complete dchar in _decode 2015-08-18 13:19:20 +02:00
Martin Nowak
acb378577d merge byChar, byWchar, and byDchar into a single byUTF implementation 2015-08-18 13:19:20 +02:00
Laeeth Isharc
55c8505576 update curl.d documentation
The examples assign the results of curl functions to a string.  But that doesn't work on dmd 2.068 running on arch, so I suggest we update them.  Please double-check my changes as I made them very quickly as limited time.
2015-08-18 00:07:27 +01:00
Robert Schadek
13a87e793e Merge pull request #3555 from joakim-noah/android
Use a central directory for remaining tests that create a temporary file
2015-08-17 14:29:21 +02:00
Steven Schveighoffer
34a7fc5235 Merge pull request #3489 from burner/issue14724
Fix issue 14724 - std.getopt: config.required breaks --help
2015-08-17 07:29:14 -04:00
H. S. Teoh
805080555a Improve std.range.radial documentation.
Add more examples to show exactly what happens if one end of the range
is reached first.
2015-08-16 19:59:24 -07:00
Robert burner Schadek
6c8b8232c3 fix issue14724
some nicer impl
2015-08-16 23:50:38 +02:00
Basile Burg
d697e0fd4f added unittests for issue 14924 2015-08-16 03:00:45 +02:00
Basile Burg
169101f7bf fix issue 14924 2015-08-16 02:55:34 +02:00
vladdeSV
b160352f5a Revert S to Char[] 2015-08-15 14:28:31 +02:00
vladdeSV
9aefe36296 Change S to Char[]
Replace std.conv.convFormat() with alias to std.format.format()
2015-08-15 12:33:06 +02:00
tobias
0c28c77174 fix issue 14920 2015-08-15 11:53:57 +02:00
anonymous
b593591978 Ddoc: fix two stray parentheses 2015-08-13 22:18:31 +02:00
Steven Schveighoffer
6a5e59a542 Merge pull request #3523 from DmitryOlshansky/revert-3466
Revert "Merge pull request #3466 from karronoli/fix-curl-options-arg"
2015-08-13 10:59:28 -04:00
Steven Schveighoffer
de76ea04be Merge pull request #3501 from Groterik/const_rbtree
Const opSlice, upperBound, lowerBound and equalRange for rbtree
2015-08-13 10:22:30 -04:00
Joakim
10f2081c5e Modify remaining tests that create a temporary file in the local directory to use std.file.deleteme, which writes to /tmp or some other absolute path instead 2015-08-13 07:23:39 -05:00
MetaLang
387b7f7319 Remove workaround for unittests failing with compiler change
I had to introduce a workaround in https://github.com/D-Programming-Language/phobos/pull/3547 because the unittests would not pass without the matching compiler change https://github.com/D-Programming-Language/dmd/pull/4868. Now that the compiler fix is merged, the workaround can be removed.
2015-08-12 10:31:29 -03:00
Robert burner Schadek
32d6e23d4e std.variant housekeeping
some bugs where resolved, so some tests could be enabled
remove outcomment code last modifed 2009

another update
2015-08-12 14:15:01 +02:00
MetaLang
597b0e0cad Fix unittests that ignore the return attribute 2015-08-12 00:16:28 -03:00
Ryan Roden-Corrent
0057756b28 Allow Variant.visit to support const types.
Assuming that Foo.depth and Bar.depth are both const (e.g. both are just int
members), the following should compile:
-----
    int depth(in FooBar fb) {
        return fb.visit!((Foo foo) => foo.depth,
                         (Bar bar) => bar.depth);
    }
-----

However, it was failing with:
std/variant.d(2246): Error: cannot implicitly convert expression (variant.peek())
of type const(Foo)* to Foo*
std/variant.d(2246): Error: cannot implicitly convert expression (variant.peek())
of type const(Bar)* to Bar*

This patch changes an explicit `T*` declaration to an `auto` declaration so
const types can be visited.
2015-08-11 22:21:38 -04:00
Dmitry Olshansky
fb54328477 Merge pull request #3529 from sdegtiarev/master
mmfile.d: MmFile destructor changed not to cal enforce
2015-08-12 00:05:51 +03:00
Sergei Degtiarev
4f3b3f4f1c mmfile.d: MmFile destructor changed not to cal enforce
commented code removed
2015-08-11 13:33:01 -04:00
vladdeSV
9097c7bc0b assert message is converted to string 2015-08-10 17:47:41 +02:00
vladdeSV
36bda43f25 Changed unittests 2015-08-10 17:16:07 +02:00
vladdeSV
4a366aad57 Added isSomeString 2015-08-10 16:58:03 +02:00
vladdeSV
c3e86ff4fc Fix error in conv.d 2015-08-10 16:20:09 +02:00
Luís Marques
4b7976bc27 Fix Issue 14884 2015-08-10 14:55:21 +01:00
Luís Marques
3730d77c04 Fix issue 14880 2015-08-10 14:38:22 +01:00
Martin Nowak
e45f39c55a Merge remote-tracking branch 'upstream/stable' into merge_stable 2015-08-10 10:07:27 +02:00
k-hara
eff54e62ca fix Issue 14890 - Can not construct a RedBlackTree of Tuples 2015-08-10 11:58:01 +09:00
Maksim Klimov
a29552563d Constness of opSlice, upperBound, lowerBound and equalRange 2015-08-09 14:41:48 -07:00
Andrei Alexandrescu
70eea5de1d Merge pull request #3430 from WalterBright/rangestrip
Range-ify std.string.strip and stripRight()
2015-08-09 20:04:08 +02:00
vladdeSV
8542d71f05 format() returns the correcty type
Change type from C to S
2015-08-09 14:41:07 +02: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
Martin Nowak
14a19c2645 Merge remote-tracking branch 'upstream/stable' into merge_stable 2015-08-05 01:34:36 +02:00
Martin Nowak
bd8ed8c13c fix Issue 14842 - [REG 2.068-b2] approxEqual does not work with integers
- promote any comparision with integers to real
2015-08-04 23:57:41 +02:00
Dmitry Olshansky
14e2b21e05 Revert "Merge pull request #3466 from karronoli/fix-curl-options-arg"
This reverts commit ea870fe080, reversing
changes made to 70028953a9.
2015-08-03 20:04:30 +03:00
Dmitry Olshansky
de4ed697c2 Merge pull request #3511 from adamdruppe/zlib
eliminate dangerous and/or useless casts from zlib
2015-08-03 17:27:39 +03:00
Steven Schveighoffer
dea9a2d0ea Merge pull request #3493 from burner/variantHousekeeping
std.variant housekeeping
2015-08-03 09:50:27 -04:00
Dmitry Olshansky
14301c6d1a Merge pull request #3186 from JohanEngelen/new_ilogb
Add a D implementation for std.math.ilogb
2015-08-03 01:51:01 +03:00