On Wednesday, 10 August 2022 at 06:15:39 UTC, Dom Disc wrote:
Ok, then I consider this is a bug in Phobos that should be
corrected.
All instances of
```D
foo(T : fixedType)(T x) { }
```
should be replaced by
```D
foo(fixedType x) { }
```
Perhaps, but not necessarily. The body of foo could d
On Tuesday, 9 August 2022 at 22:58:16 UTC, Paul Backus wrote:
On Tuesday, 9 August 2022 at 22:36:23 UTC, Dom Disc wrote:
On Tuesday, 9 August 2022 at 22:32:23 UTC, Dom Disc wrote:
On Tuesday, 9 August 2022 at 21:16:22 UTC, Paul Backus wrote:
Yes, this syntax allows anything that implicitly conv
On Tuesday, 9 August 2022 at 22:36:23 UTC, Dom Disc wrote:
On Tuesday, 9 August 2022 at 22:32:23 UTC, Dom Disc wrote:
On Tuesday, 9 August 2022 at 21:16:22 UTC, Paul Backus wrote:
Yes, this syntax allows anything that implicitly converts to
`BigInt`;
Oh, or do you mean I will get two differen
On Tuesday, 9 August 2022 at 22:32:23 UTC, Dom Disc wrote:
On Tuesday, 9 August 2022 at 21:16:22 UTC, Paul Backus wrote:
Yes, this syntax allows anything that implicitly converts to
`BigInt`;
Oh, or do you mean I will get two different instances of the
template, if I call it with two differen
On Tuesday, 9 August 2022 at 21:16:22 UTC, Paul Backus wrote:
Yes, this syntax allows anything that implicitly converts to
`BigInt`; for example:
```d
import std.bigint;
void fun(T : BigInt)(T t)
{
pragma(msg, "Instantiated with T = `" ~ T.stringof ~ "`");
}
struct S
{
BigInt n;
a
On Tuesday, 9 August 2022 at 21:08:52 UTC, Meta wrote:
(it may also include anything that is a subtype of BigInt...
I've received different answers on what exactly `(T: SomeType)`
means in this context).
Yes, this syntax allows anything that implicitly converts to
`BigInt`; for example:
```
On Monday, 8 August 2022 at 12:02:02 UTC, Dom Disc wrote:
Hello.
I found in the documentation functions declared like this:
```D
pure @nogc @safe BigInt opAssign(T : BigInt)(T x);
```
This is a template function, even if T is constrained to always
be BigInt (it may also include anything that
On Monday, 8 August 2022 at 14:48:27 UTC, Dom Disc wrote:
On Monday, 8 August 2022 at 12:46:48 UTC, bauss wrote:
On Monday, 8 August 2022 at 12:02:02 UTC, Dom Disc wrote:
```D
pure @nogc @safe BigInt opAssign(T : BigInt)(T x);
```
This will only be included in the object file if used.
```D
On Monday, 8 August 2022 at 12:46:48 UTC, bauss wrote:
On Monday, 8 August 2022 at 12:02:02 UTC, Dom Disc wrote:
```D
pure @nogc @safe BigInt opAssign(T : BigInt)(T x);
```
This will only be included in the object file if used.
```D
pure @nogc @safe BigInt opAssign(BigInt x);
```
This wil
On 8/8/22 8:02 AM, Dom Disc wrote:
Hello.
I found in the documentation functions declared like this:
```D
pure @nogc @safe BigInt opAssign(T : BigInt)(T x);
```
What is the difference to declaring it like:
```D
pure @nogc @safe BigInt opAssign(BigInt x);
```
To me the first declaration seems
On Monday, 8 August 2022 at 12:02:02 UTC, Dom Disc wrote:
```D
pure @nogc @safe BigInt opAssign(T : BigInt)(T x);
```
This will only be included in the object file if used.
What is the difference to declaring it like:
```D
pure @nogc @safe BigInt opAssign(BigInt x);
```
This will always
Hello.
I found in the documentation functions declared like this:
```D
pure @nogc @safe BigInt opAssign(T : BigInt)(T x);
```
What is the difference to declaring it like:
```D
pure @nogc @safe BigInt opAssign(BigInt x);
```
To me the first declaration seems to be unnecessarily bloated, so
I a
12 matches
Mail list logo