The Dlang Bot
b676da0a98
Merge pull request #6047 from BBasile/issue-11747
...
fix issue 11747 - Better error message with @disabled toString
merged-on-behalf-of: H. S. Teoh <quickfur@users.noreply.github.com>
2018-01-27 04:43:23 +01:00
Basile Burg
860eeb59b8
fix typo in code comment
2018-01-26 13:37:08 +01:00
The Dlang Bot
48b3d0914a
Merge pull request #5991 from JackStouffer/format-tostring
...
[RFC] Make Output Ranges Using Methods The Preferred toString Option
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-01-24 05:41:23 +01:00
Basile Burg
4f67cdf115
fix issue 11747 - Better error message with @disabled toString
2018-01-22 09:57:04 +01:00
The Dlang Bot
976cb990f1
Merge pull request #6014 from wilzbach/complex
...
Start to move away from complex and imaginary types
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2018-01-18 22:34:40 +01:00
Sebastian Wilzbach
a972e266ed
Allow running all unittest with -transition=complex
2018-01-17 11:14:32 +01:00
The Dlang Bot
4f8d010f1a
Merge pull request #6026 from JackStouffer/format-guess-length
...
Optimized format with compile time format strings
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2018-01-16 16:59:04 +01:00
Jack Stouffer
6527cbe107
Optimized compile time formatstring format overloads
...
Added function to std.format to make an educated guess at the length of the resulting string,
use that data to reserve capacity in the appender before anything is written to it.
2018-01-16 09:30:03 -05:00
Basile Burg
f9058bce61
fix issue 7054 - format() aligns using code units instead of graphemes
2018-01-13 00:20:44 +01:00
Jack Stouffer
1dd6df3bc2
Modify std.format to recognize output range using toString
2018-01-12 09:40:39 -05:00
Sebastian Wilzbach
6f0aa28dcb
Remove unused primitiveTypeInfo and deprecate unused Mangle
2018-01-09 20:36:26 +01:00
Sebastian Wilzbach
ee612de84f
Use a switch instead of a global dictionary for primitiveTypeInfo
2018-01-08 19:09:53 +01:00
The Dlang Bot
f3189822ab
Merge pull request #5989 from wilzbach/static-foreach
...
Use static foreach in Phobos
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2018-01-03 19:05:07 +01:00
Sebastian Wilzbach
7de3787876
Use static foreach in Phobos
2018-01-03 17:30:11 +01:00
The Dlang Bot
5c37fa2046
Merge pull request #5985 from wilzbach/small-safe-2
...
@safeify more unittests II
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-01-03 10:39:35 +01:00
Sebastian Wilzbach
b0575c8a66
@safeify more unittests II
2018-01-03 06:26:05 +01:00
Daniel Kozak
146306a27b
Fix Issue 18152 - Make std.format.formattedRead usable with rvalues
2018-01-02 21:57:07 +01:00
The Dlang Bot
5964600c8d
Merge pull request #5923 from JackStouffer/formatValue
...
Unify overloads and documentation for formatValue
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2017-12-14 15:10:30 +01:00
Sebastian Wilzbach
194d96fd2d
Remove self imports from std.format
2017-12-14 04:17:46 +01:00
Sebastian Wilzbach
fee0ee13ef
Append nits to PR/5923
2017-12-14 04:17:45 +01:00
Jack Stouffer
1050089803
Moved all documentation to the main overload of formatValue
2017-12-13 12:46:31 -05:00
Andrei Alexandrescu
8962271564
whitespace
2017-12-09 11:53:15 -05:00
Robert burner Schadek
9352627f89
Fix for problems with format seperators
...
fix issue 17459
fix issue 18047
This is in one commit as the two problem are located at the place
andrei review
2017-12-09 14:21:55 +01:00
Jack Stouffer
2d6c43d583
changed formatValue overloads to formatValueImpl
2017-11-28 12:02:03 -05:00
Sebastian Wilzbach
df6365092a
Replace body
keyword with its replacement: do
...
Automatic replacement with
sed -i "s/^\([ ]*\)body/\1do/" -i **/*.d
2017-11-20 15:33:52 +01:00
Basile Burg
fc5fe24ac2
disable OSX 32 bits due to an unfixed compiler issue
2017-09-13 15:31:01 +02:00
Basile Burg
e606879eac
fix issue 10444 - writeln of a SIMD register
2017-09-10 12:53:01 +02:00
Jack Applegame
d2a3d8ae71
Remove unnecessary auto refs and fix style.
2017-07-23 16:02:18 +03:00
Jack Applegame
6995c19d61
Change "ref" to "auto ref"
2017-07-23 15:27:05 +03:00
Jack Applegame
7d1b0891bb
formattedWrite should take output range by reference
...
At the moment formattedWrite takes output range by value. It prevents to pass non-copyable ranges.
2017-07-23 15:18:59 +03:00
The Dlang Bot
436b67825c
Merge pull request #5440 from Geod24/format-extended
...
Simplify and improve format positional argument output (+bonus test)
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>
2017-07-02 21:21:15 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
...
This reverts commit 998ad51fd7
.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
998ad51fd7
Sort selective imports
2017-06-12 08:12:09 +02:00
Sebastian Wilzbach
61717ecc7d
Sort imports
2017-06-12 07:54:38 +02:00
Geod24
fe55345a74
Simplify and improve format positional argument output
...
The previous code was needlessly complicated, storing arguments' as `void*` in an array,
and having a matching array of delegates to cast them.
It was not ctfe-able which required an extra code path, and tricks such as an artificial call to the `formatValue` function to ensure correct inference of `@safe`ty.
The new code do away with those limitations by simply using a switch of which branches are CT-generated.
This simple technique makes the code faster, as less instructions are generated, inlining is possible, and a switch with not so many cases will usually result in a jump table being generated.
2017-06-05 03:04:26 +02:00
Geod24
3d2d786110
std.format: Add a test for range of argument formatting
...
This feature was totally untested and is not documented either.
The only way I could find about it was while reading a comment in the code.
2017-06-02 00:14:04 +02:00
Martin Nowak
c46fe4bc2c
Merge remote-tracking branch 'upstream/stable' into merge_stable
2017-06-01 05:53:15 +02:00
Martin
13ca4ddac7
Relax a few unittests for double-precision reals
...
A loss-less roundtrip (to string <=> parse) apparently isn't guaranteed
when using double-precision reals.
2017-05-24 23:51:54 +02:00
Nick Treleaven
3a367d3f4e
Test positional width/precision
2017-05-08 12:39:23 +01:00
Nick Treleaven
4c86b69672
Show argument kind in getNth exception messages
...
Show argument number for type mismatches, but not for missing arguments.
Also remove unnecessary to!int calls.
2017-05-05 08:31:14 +01:00
Nick Treleaven
88e26cbda6
Improve format separator docs
2017-05-03 16:08:34 +01:00
Nick Treleaven
88fc139610
Show type for missing width/precision/separatorChar
...
Also add tests for incorrect arguments with separatorChar.
2017-05-03 15:46:55 +01:00
Nick Treleaven
6dd51ec8f1
Throw exception when positional format spec exceeds args.length
...
Before this threw "Orphan format arguments: args[3..2]" (and that is
due to be removed).
2017-05-01 10:04:55 +01:00
Nick Treleaven
cc8eff102f
Add tests
2017-04-26 13:21:13 +01:00
Nick Treleaven
9ef964bf53
Refactor getNth with switch
...
Switch is faster & reduces template bloat vs. recursion.
Also fixes over-specific missing argument message (not just for int).
2017-04-25 12:46:18 +01:00
Nick Treleaven
a1f4df7e9b
Refactor formatNth without mixin
2017-04-25 12:45:01 +01:00
Robert burner Schadek
7ddc85db37
format with comma formatspec to add separator into numbers
2017-04-19 09:05:14 +02:00
The Dlang Bot
df82dea9ca
Merge pull request #4949 from andralex/onRangeError
...
Replace use of onRangeError
merged-on-behalf-of: H. S. Teoh <quickfur@users.noreply.github.com>
2017-04-06 20:32:16 +02:00
H. S. Teoh
9e4aa3249d
Remove now-redundant import of onRangeError.
2017-04-06 10:36:41 -07:00
The Dlang Bot
9595c9c278
Merge pull request #5314 from ntrel/format-ex
...
std.format: Improve FormatException messages
merged-on-behalf-of: Jack Stouffer <jack@jackstouffer.com>
2017-04-03 19:16:58 +02:00