Commit graph

16323 commits

Author SHA1 Message Date
Nathan Sashihara
c7fb52ecab Fix Issue 24082 - add Int128.toString that supports std.format
toString has template parameter FormatSpec instead of template parameter
Char and argument std.format.FormatSpec!Char so importing std.int128
does not require importing std.format unless toString is actually used
(pay as you go).
2023-08-18 20:10:32 -04:00
H. S. Teoh
4773cdf85d Cross-link to std.mathspecial. 2023-08-18 00:50:20 +02:00
Iain Buclaw
ecb5606acd Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-08-15 19:18:40 +00:00
Temtaime
97647042ca Fix hang with buffer > 4gb 2023-08-14 02:38:04 +02:00
The Dlang Bot
d3c2be90e8
Merge pull request #8795 from ntrel/ex-panels
[std/exception] Tweak docs

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2023-08-12 02:21:52 +02:00
Nick Treleaven
3a8d5018bc [std/array] Split staticArray overloads into two groups
It's easier to follow with the range overloads separate.
Tweak wording.
2023-08-12 02:21:04 +02:00
Nick Treleaven
d31490eaab Tweak wording of assumeUnique 2023-08-11 16:35:15 +01:00
Nick Treleaven
a2df1e6733 [std/exception] Use PANEL macro to group paragraphs 2023-08-11 16:35:15 +01:00
Temtaime
f73555bf8e
Use size_t instead of uint for data indexing, because it hangs with files > 4g on x64 2023-08-06 00:56:26 +03:00
FeepingCreature
75372efef2
Fix issue 24064: use consistent types for ResultRanges. (#8791)
`source` is `Unqual!Ranges`, not `Ranges`.
2023-08-03 10:10:12 +03:00
Dennis
569bc57098
Mark unsafe union access @trusted (#8787) 2023-07-31 13:58:35 +03:00
Nick Treleaven
9a90edf7a9
[std.conv] Tweak to, parse docs (#8785)
* [std.conv] Tweak docs

Fix formatting of `Integer` grammar.
Minor tweaks.
Use the PANEL macro to introduce the `parse` overloads.
Reorder `parse` constraint expressions to follow parameter order. In
particular, Target should come first.

* Improve `parse` descriptions & continue reordering constraint exps
2023-07-31 13:04:46 +03:00
Dennis
8be9001448
Merge pull request #8788 from ntrel/param-seq
[std/traits] Avoid template recursion for 3 ParameterSeq traits
2023-07-30 17:54:43 +02:00
Nick Treleaven
c7ed8b2f04 Use mixin expression instead of mixin declaration 2023-07-30 16:06:57 +01:00
Nick Treleaven
826960b229 Use mixin expr, avoid concat, remove @trusted
Use return scope instead of @trusted workaround.
2023-07-29 13:25:23 +01:00
Nick Treleaven
c356395dcb Remove ParameterIdentifierTuple.Get template 2023-07-28 21:12:59 +01:00
Nick Treleaven
e55f2c2df3 [std/traits] Avoid template recursion for 3 Parameter traits 2023-07-28 20:58:26 +01:00
Dennis Korpel
3b383798dd Fix unsafe union access in std.format 2023-07-27 20:26:20 +02:00
Dennis
ac7e69151d
Fix 24049 - std.conv.to: string to enum conversion is not documented (#8784)
* Fix 24049 - std.conv.to: string to enum conversion is not documented

* Update std/conv.d

Co-authored-by: Max Haughton <maxhaton@gmail.com>

---------

Co-authored-by: Max Haughton <maxhaton@gmail.com>
2023-07-24 11:21:52 +03:00
Iain Buclaw
faca94c214 Fix broken tests caused by merge conflicts 2023-07-15 14:15:20 +00:00
Iain Buclaw
ab307c9acf Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-07-15 13:49:21 +00:00
Iain Buclaw
105bc4508c Remove declarations with expired deprecations 2023-07-04 21:37:48 +02:00
Mathis Beer
2649d6fe1b Add warning to std.json that it doesn't play well with the GC.
Production experience as well as synthetic tests have shown that std.json's use of associative arrays combined with GC issues causes heavy heap fragmentation. Furthermore, its heavy GC usage makes it unperformant in a threaded environment.
Despite this, people keep using std.json for production workloads, then being disappointed when it doesn't measure up. So let's warn them upfront.
2023-07-04 12:24:25 +02:00
FeepingCreature
dfcbee7056 Fix issue 24027: Instead of a bunch of special-cases, just check that Rebindable did in fact alias itself away.
This looks ugly, but it's just for the `stable` branch - this is fixed on `master` via the `Rebindable2` rewrite https://github.com/dlang/phobos/pull/8768
2023-07-04 01:31:32 +02:00
Paul Backus
afe5d47167 Fix issue 24028 - BigInt power operator ignores sign of exponent 2023-07-03 12:19:09 -04:00
Iain Buclaw
a3526d11dd Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-07-02 02:10:20 +00:00
Nick Treleaven
b455568099
[std/traits] Improve getSymbolsByUDA test (#8774)
This is also necessary for https://github.com/dlang/dmd/pull/15363.
2023-06-28 16:22:15 +03:00
Dennis
5a3ac67c13
Merge pull request #8764 from FeepingCreature/fix/issue-23993-discard-rebindable-before-calling-compare
Fix issue 23993: Discard Rebindable before passing extremum to compar…
2023-06-28 11:47:53 +02:00
Mathis Beer
1d2b992c44 Fix issue 23976: std.range.slide fails in dmd-2.104.0
I think possibly `hasShownPartialBefore` is just simply wrongly named in the `withPartial` branch.
2023-06-23 07:27:09 +02:00
Vladimir Panteleev
b1612bbc38
Fix Issue 23997 - isClose(1, -double.infinity) returns true (#8767) 2023-06-22 17:41:44 +03:00
Walter Bright
33f63dbd5d
std.stdio: add glossary, fileno_t (#8772) 2023-06-22 17:41:08 +03:00
Walter Bright
b3e664e174
Merge pull request #8770 from WalterBright/setmode
fix Issue 23312 - Crash when calling writeln in WinMain
2023-06-21 11:24:52 -07:00
Dennis
7f10ebc7fa
Merge pull request #8768 from FeepingCreature/feature/add-typecons-rebindable2
Add std.typecons.Rebindable2 for internal use.
2023-06-21 11:54:10 +02:00
Dennis
e411f326c1
Merge pull request #8771 from WalterBright/stdio-version
std.stdio: add default case
2023-06-21 11:37:31 +02:00
Walter Bright
e690d40e0b std.stdio: add default case 2023-06-21 01:46:06 -07:00
Walter Bright
cdf9ce5e51 fix Issue 23312 - Crash when calling writeln in WinMain 2023-06-21 01:33:33 -07:00
Mathis Beer
10601cc046 Add std.typecons.Rebindable2 for internal use.
Rebindable2 is a simplified version of std.typecons.Rebindable that clears up every special case: classes, arrays and structs now have the same struct.
Whichever type you instantiate `Rebindable2` with, you always get the same type out by calling `value.get` on the resulting container.
Also use this type to simplify the parts of Phobos we previously used `Rebindable` for.
2023-06-19 13:24:30 +02:00
Dennis
623a2af71b
Merge pull request #8763 from dukc/unicode-purity
fix issue 23361 - std.uni.normalize made pure
2023-06-18 14:45:11 +02:00
Dennis
5cd77a6e32
User hyperlinks to refer to bugzilla issues (#8766) 2023-06-16 14:45:44 +03:00
Iain Buclaw
449256b816 Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-06-15 22:14:10 +00:00
FeepingCreature
f715941036 Fix issue 23993: Discard Rebindable before passing extremum to comparator. 2023-06-15 19:06:27 +02:00
Richard (Rikki) Andrew Cattermole
f22cc260f8
Improve std.regex wordMatcher build times by delaying its work from CT to RT if possible (#8699) 2023-06-15 09:44:40 +03:00
Ate Eskola
e6ed401821 fix issue 23361 - std.uni.normalize made pure 2023-06-14 20:38:24 +03:00
Dmytro Katyukha
f263028f11 std.path.absolutePath: make compatible with scope and preview='in'
When using `absolutePath` with 'priview=in' enabled,
it requires to duplicate value to be able to call this function.
Within this commit the signature of `absolutePath` function
is changed from `string absolutePath(string path, lazy string base = getcwd())`
to `string absolutePath(return scope const string path, lazy string base = getcwd())`
thus, after this commit it is possible to use this func in scope context.

Example case:

```d
/+ dub.sdl:
    name "dub-example"
    dflags "-preview=in" "-preview=dip1000"
+/

import std.stdio;
import std.path;

@safe:

    string fun(in string path) {
        return path.absolutePath;
    }

    void main() {
        string p = fun("~/tests/1");
        writefln("P: %s", p);
    }

```
2023-06-03 01:21:02 +02:00
Iain Buclaw
e394dbec63 Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-06-02 10:21:03 +00:00
RazvanN7
5d61a31133 Don't use this in static context in std.range.package 2023-05-31 01:26:21 +02:00
Jan Jurzitza
f8c80db44e
Fix upcoming D-Scanner argument warnings (#8753)
* upgrade D-Scanner

* Fix upcoming D-Scanner argument checks
2023-05-30 09:42:02 +03:00
Johan Engelen
75a507f883
typecons: fix use-after-scope bug in RefCounted unittest (#8751)
* typecons: fix use-after-scope bug in RefCounted unittest

The access through `p` to `rc1` outside the scope of `rc1` is undefined behavior. We have to artificially end the scope of `rc1` and `rc2`, such that within the same scope we can check that the destructor calls do the correct thing of nulling the `_store`.

* fixup

* fixup
2023-05-29 16:00:15 +03:00
Vladimir Panteleev
cca8661113 Fix Issue 23940 - std.getopt does not assert with options that only differ in case with config.caseInsensitive 2023-05-27 17:38:25 +02:00
Robert burner Schadek
e1f7edae57 Better std.algorithm.iteration.permutations error messages 2023-05-26 05:45:32 +02:00