On Tuesday, 14 December 2021 at 15:14:40 UTC, Steven
Schveighoffer wrote:
On 12/14/21 12:04 AM, Tejas wrote:
Is there anything wrong with the answer I posted?
Can you please tell me if there's anything dissatisfactory
about it? I feel like it does everything the OP wants.
Also, am I wrong in
On Tuesday, 14 December 2021 at 13:25:04 UTC, apz28 wrote:
On Tuesday, 14 December 2021 at 05:04:46 UTC, Tejas wrote:
Is there anything wrong with the answer I posted?
Can you please tell me if there's anything dissatisfactory
about it? I feel like it does everything the OP wants.
Also, am I
On 12/14/21 12:04 AM, Tejas wrote:
Is there anything wrong with the answer I posted?
Can you please tell me if there's anything dissatisfactory about it? I
feel like it does everything the OP wants.
Also, am I wrong in using `Unconst` over `Unqual`? Isn't `Unqual`
overkill if you just want t
On Tuesday, 14 December 2021 at 05:04:46 UTC, Tejas wrote:
Is there anything wrong with the answer I posted?
Can you please tell me if there's anything dissatisfactory
about it? I feel like it does everything the OP wants.
Also, am I wrong in using `Unconst` over `Unqual`? Isn't
`Unqual` ove
On Monday, 13 December 2021 at 20:43:51 UTC, Steven Schveighoffer
wrote:
On 12/11/21 10:02 PM, apz28 wrote:
On Sunday, 12 December 2021 at 00:02:25 UTC, Stanislav Blinov
wrote:
@apz28, I can't figure out the intent here. To convert result
of abs to an unsigned?
The function logic works only f
On Saturday, 11 December 2021 at 23:44:59 UTC, Adam Ruppe wrote:
On Saturday, 11 December 2021 at 23:17:17 UTC, Stanislav Blinov
wrote:
? No. If it was unsatisfied constraint, the error would've
shown that.
And if you try to instantiate it, you'll see it is an
unsatisfied constraint anyway. T
On 12/11/21 10:02 PM, apz28 wrote:
On Sunday, 12 December 2021 at 00:02:25 UTC, Stanislav Blinov wrote:
@apz28, I can't figure out the intent here. To convert result of abs
to an unsigned?
The function logic works only for unsigned type and the parameter value
can be altered in body hence Unq
On Sunday, 12 December 2021 at 03:02:28 UTC, apz28 wrote:
On Sunday, 12 December 2021 at 00:02:25 UTC, Stanislav Blinov
wrote:
@apz28, I can't figure out the intent here. To convert result
of abs to an unsigned?
The function logic works only for unsigned type and the
parameter value can be al
On Sunday, 12 December 2021 at 00:02:25 UTC, Stanislav Blinov
wrote:
@apz28, I can't figure out the intent here. To convert result
of abs to an unsigned?
The function logic works only for unsigned type and the parameter
value can be altered in body hence Unqual. If not Unqual, must
declare a
On Saturday, 11 December 2021 at 23:44:59 UTC, Adam Ruppe wrote:
On Saturday, 11 December 2021 at 23:17:17 UTC, Stanislav Blinov
wrote:
? No. If it was unsatisfied constraint, the error would've
shown that.
And if you try to instantiate it, you'll see it is an
unsatisfied constraint anyway. T
On Saturday, 11 December 2021 at 23:17:17 UTC, Stanislav Blinov
wrote:
? No. If it was unsatisfied constraint, the error would've
shown that.
And if you try to instantiate it, you'll see it is an unsatisfied
constraint anyway. There's two layers of failure here.
Using Unqual there is pretty
On Saturday, 11 December 2021 at 22:59:52 UTC, Adam Ruppe wrote:
On Saturday, 11 December 2021 at 22:50:45 UTC, apz28 wrote:
void foo2(T)(Unqual!T x) if(isUnsigned!T) {}
This means it treats foo2 as if it doesn't exist unless T is
unsigned...
onlineapp.d(15): Error: template `onlineapp.foo2
On Saturday, 11 December 2021 at 22:50:45 UTC, apz28 wrote:
void foo2(T)(Unqual!T x) if(isUnsigned!T) {}
This means it treats foo2 as if it doesn't exist unless T is
unsigned...
onlineapp.d(15): Error: template `onlineapp.foo2` cannot deduce
function from argument types `!()(int)`
onlineap
void foo1(ubyte x) {}
void foo1(ushort x) {}
void foo1(uint x) {}
void foo1(ulong x) {}
import std.traits : isUnsigned, Unqual;
void foo2(T)(Unqual!T x) if(isUnsigned!T) {}
void main()
{
import std.math;
int s = 1;
foo1(abs(s));
foo2(abs(s)); //failed?
14 matches
Mail list logo