At present my dmd toolsets are DMD2.103+Visual Stiduo 2015
Community+ a lot of libraries built by them and I prefer building
64 bit apps under Win10 64. For some reason,I am planning to
upgrade VS2015 community to VS2017+,or even VS2022.If I do
so,should all those already built libaries have
On Thursday, November 23, 2023 2:20:25 PM MST Antonio via Digitalmars-d-learn
wrote:
> * Why, when applied to interface, ```opEquals``` called directly
> behavior is not the same that when calling ```==``` ?
>
> * Is it the expected behaviour?
I'd have to take the time to study your code in
On Wednesday, 22 November 2023 at 19:37:58 UTC, Paul Backus wrote:
This is a bug/limitation in the compiler. I couldn't find an
existing report on issues.dlang.org, so I've reported it myself
as [issue 24255][1].
Wow: It is a very concise bug example.
I tested with ```ldc``` ant it fails
```d
interface IOpt(T)
{
T value();
bool empty();
bool opEquals(IOpt!T other);
}
class None(T) : IOpt!T
{
bool empty() => true;
T value(){ throw new Exception("None has not a value"); }
bool opEquals(IOpt!T other)=>other.empty;
}
class Some(T) : IOpt!T
{
this(T value) {
On Thursday, 23 November 2023 at 20:13:59 UTC, BoQsc wrote:
Nothing wrong. It would be just a more concise compact way to
do the same.
Also I mostly wanted to know if something like that is already
possible in D language.
It's not a huge loss if it is not possible.
This is possible in Go:
On Thursday, 23 November 2023 at 20:00:31 UTC, H. S. Teoh wrote:
On Thu, Nov 23, 2023 at 07:22:22PM +, BoQsc via
Digitalmars-d-learn wrote:
Is it possible to declare empty pointer variable inside
function calls and pass its address to the function?
These are sometimes required while using
On Thursday, 23 November 2023 at 18:54:09 UTC, Julian Fondren
wrote:
[...]
The `enum` answer?
[...]
No, the 'template' answer.
To me, if the 'template' suggestion worked (as it did), then my
simple mixin (as in my original post) should also work.
On Thu, Nov 23, 2023 at 07:22:22PM +, BoQsc via Digitalmars-d-learn wrote:
> Is it possible to declare empty pointer variable inside function calls
> and pass its address to the function?
>
> These are sometimes required while using Win32 - Windows Operating
> System API.
>
> * Empty pointer
On Thursday, November 23, 2023 11:29:09 AM MST denis via Digitalmars-d-learn
wrote:
> Let's say I have a D application, with some callbacks from C,
> where some arguments to the callbacks are `const char* path`.
> What is the recommended way to compare them to D strings? Without
> making
Is it possible to declare empty pointer variable inside function
calls and pass its address to the function?
These are sometimes required while using Win32 - Windows
Operating System API.
* Empty pointer variables are used by functions to return
information after the function is done.
My
```d
interface I {
bool check();
}
class A : I {
bool check() =>true;
}
class B : I {
bool check() =>false;
}
I aOrB(bool check) => check ? new A() : new B();
void main()
{
assert( aOrB(true).check );
}
```
Compiler error:
```d
x.d(11): Error: cannot implicitly
On Thursday, 23 November 2023 at 17:46:55 UTC, DLearner wrote:
I just find it surprising that your suggestion worked, but the
(slightly simpler) earlier version did not.
The `enum` answer? That also works, but you have to make a change
at the callsite as well, to `mixin(mxnTest!("Var_A",
Let's say I have a D application, with some callbacks from C,
where some arguments to the callbacks are `const char* path`.
What is the recommended way to compare them to D strings? Without
making allocations, if that's possible
On Thursday, 23 November 2023 at 17:03:29 UTC, Julian Fondren
wrote:
On Thursday, 23 November 2023 at 16:33:52 UTC, DLearner wrote:
Why is this so, bearing in mind the concatenations are
executed at
compile, not run, time?
If you compile without -betterC, it'll work, but if you examine
the
On Thursday, 23 November 2023 at 16:33:52 UTC, DLearner wrote:
Why is this so, bearing in mind the concatenations are executed
at
compile, not run, time?
If you compile without -betterC, it'll work, but if you examine
the result you'll find that the mxnTest function is still
compiled into
On Thursday, 23 November 2023 at 16:33:52 UTC, DLearner wrote:
Code below is intended to test simple mixin with lambda
function under -betterC.
Works with full-D, but fails with 'needs GC' errors under
-betterC.
Why is this so, bearing in mind the concatenations are executed
at
compile, not
Code below is intended to test simple mixin with lambda function
under -betterC.
Works with full-D, but fails with 'needs GC' errors under
-betterC.
Why is this so, bearing in mind the concatenations are executed at
compile, not run, time?
```
// Test harness
extern(C) void main() {
17 matches
Mail list logo