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).
[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>
* [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
* 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>
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.
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.
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);
}
```
* 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