On 2020-11-11 06:29, WhatMeWorry wrote:
Which begs the question, how would the statement, m_State = new
BreakState() ever get executed?
class DebuggerSession
{
private BreakState m_State = new BreakState();
private UnrealCallback m_UnrealCallback;
this( )
{
}
//
I've been studying an 8 year old D project in Github and this
code fragment has left me befuddled. I'm confused as to when and
how the new BreakState() statement gets executed. Wouldn't the
class DebuggerSession need to be instantiated first and then the
this() constructor be called? Which
On Wednesday, 11 November 2020 at 02:05:33 UTC, H. S. Teoh wrote:
Definitely. Bad/confusing error messages should always be
improved. Please file a bug at:
http://issues.dlang.org/
T
https://issues.dlang.org/show_bug.cgi?id=21377
I wonder if this is the same as:
On Wed, Nov 11, 2020 at 01:05:21AM +, SealabJaster via Digitalmars-d-learn
wrote:
> Please see the code at https://run.dlang.io/is/Yjidek
[Quoting code in full here for future reference]
> struct PreValidate
> {
> alias FuncT = bool delegate(string arg);
>
> FuncT func;
>
>
On Wednesday, 11 November 2020 at 01:05:21 UTC, SealabJaster
wrote:
Please see the code at https://run.dlang.io/is/Yjidek
As I understand the error is caused by trying to provide a
delegate when there's no context to provide. Not complaining
about that.
However what I am complaining about
Please see the code at https://run.dlang.io/is/Yjidek
As I understand the error is caused by trying to provide a
delegate when there's no context to provide. Not complaining
about that.
However what I am complaining about is about the error message:
`onlineapp.d(31): Error: delegate
On Monday, 9 November 2020 at 17:06:50 UTC, H. S. Teoh wrote:
I'm pretty sure std.regex already supports Unicode regexes.
Yep [1].
Thanks
[1]
https://dlang.org/phobos/std_regex.html#Syntax%20and%20general%20information
On Tuesday, 10 November 2020 at 20:32:40 UTC, Paul Backus wrote:
The compiler infers pure, @nogc, nothrow etc. for template
functions automatically. It's actually better if you don't add
them by hand.
Ok, thanks :-).
On Tuesday, 10 November 2020 at 20:32:40 UTC, Paul Backus wrote:
alias isOrderingComparableWith(T, U) = __traits(compiles,
(T t, U u) => t < u);
My bad, should be `enum`, not `alias`.
On Tuesday, 10 November 2020 at 17:19:09 UTC, Ola Fosheim Grøstad
wrote:
Interesting, so "auto ref T" is the go-to type specifier for
generic code then? I guess I also should conditionally add
things like pure, nogc, nothrow... I assume I would have to
test the comparison operator. I
On Tue, Nov 10, 2020 at 11:55 AM Max Samukha via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> We can get the compile time equivalent of a member function's
> address by applying '&' to the function in a static context:
>
> struct S {
> void foo() {}
> }
>
> enum pfoo =
On Tue, Nov 10, 2020 at 8:50 PM Max Samukha via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> On Tuesday, 10 November 2020 at 14:36:04 UTC, Steven
> Schveighoffer wrote:
>
> >>
> >> Is there a way to get a pointer to a non-static nested
> >> function?
> >
> > I don't think you
On Tuesday, 10 November 2020 at 14:36:04 UTC, Steven
Schveighoffer wrote:
Is there a way to get a pointer to a non-static nested
function?
I don't think you can do it at compile time. You can at runtime
by accessing the funcptr of the delegate.
-Steve
Thanks for the reply. I will post
On Tuesday, 10 November 2020 at 17:09:00 UTC, Paul Backus wrote:
bool between(Value, Bound)(auto ref Value value, auto ref Bound
low, auto ref Bound high)
{
return (low < value) && (value < high);
}
You need `auto ref` because either Bound or Value may have
copying disabled. Because the
On Tuesday, 10 November 2020 at 16:55:11 UTC, Ola Fosheim Grøstad
wrote:
I want to implement a generic function for "a < f(x) < b" that
will give the same result as "(a < f(x)) && (f(x) < b)" for any
conceivable mix of types. Except if that "f(x)" should only be
evaluated once.
Is it
I want to implement a generic function for "a < f(x) < b" that
will give the same result as "(a < f(x)) && (f(x) < b)" for any
conceivable mix of types. Except if that "f(x)" should only be
evaluated once.
Is it sufficient to use "scope ref" in parameters?
I don't want to assume _anything_
On 11/10/20 5:51 AM, Max Samukha wrote:
We can get the compile time equivalent of a member function's address by
applying '&' to the function in a static context:
struct S {
void foo() {}
}
enum pfoo = // ok
void main() {
// now we can use the pointer to create, for example, a
On Tuesday, 10 November 2020 at 09:47:06 UTC, sarn wrote:
On Tuesday, 10 November 2020 at 08:19:15 UTC, Vino wrote:
[...]
This is iterating over all the elements in data2 and outputting
some of them, so the output will never be longer than data2.
[...]
Hi Sarn,
Thank you very much
On Tuesday, 10 November 2020 at 11:49:19 UTC, Jerry wrote:
On Tuesday, 10 November 2020 at 11:38:30 UTC, Vladimirs
Nordholm wrote:
Hello.
I am unsure if I am going about this the right way, and if my
question even makes sense.
In essence what I want is to have two "types" represented by a
On Tuesday, 10 November 2020 at 11:38:30 UTC, Vladimirs Nordholm
wrote:
Hello.
I am unsure if I am going about this the right way, and if my
question even makes sense.
In essence what I want is to have two "types" represented by a
size_t. Here is an example of what I want think I want (but
Hello.
I am unsure if I am going about this the right way, and if my
question even makes sense.
In essence what I want is to have two "types" represented by a
size_t. Here is an example of what I want think I want (but might
be completely off)
alias Foo = size_t;
alias Bar =
We can get the compile time equivalent of a member function's
address by applying '&' to the function in a static context:
struct S {
void foo() {}
}
enum pfoo = // ok
void main() {
// now we can use the pointer to create, for example, a
delegate
S s;
void delegate() dg;
On Tuesday, 10 November 2020 at 08:19:15 UTC, Vino wrote:
foreach(i; data2[]) {
if(data1[].canFind(i[0])) {
writeln(i[1]);
}
}
This is iterating over all the elements in data2 and outputting
some of them, so the output will never be longer than data2.
It looks like you want to
Hi All,
Request your help, the below code output's as below hence
request your help on hot to get the output as below(Required
Output).
Output
DEV Cluster
QAS Cluster
Required Output
DEV Cluster
DEV Cluster
DEV Cluster
QAS Cluster
Code
import std.container.array;
import std.stdio:
24 matches
Mail list logo