On Tuesday, 7 December 2021 at 18:50:04 UTC, Ali Çehreli wrote:
I don't know whether the workaround works with your program but
that delegate is the equivalent of the following struct (the
struct should be faster because there is no dynamic context
allocation). Note the type of 'dg' is changed
On 12/7/21 1:03 PM, Q. Schroll wrote:
On Tuesday, 7 December 2021 at 12:43:40 UTC, Rumbu wrote:
Bug or feature?
Feature. It even has a name: "overload set". It keeps you from
accidentally calling a function you had no idea existed, for example
because of a name clash.
Not in this case.
On 12/7/21 7:30 AM, Andrey Zherikov wrote:
> auto createDelegate(string s)
> {
> return { s.writeln; }; // Error: closures are not yet
> supported in CTFE
> }
I don't know whether the workaround works with your program but that
delegate is the equivalent of the following struct (the
On Tuesday, 7 December 2021 at 12:43:40 UTC, Rumbu wrote:
Bug or feature?
Feature. It even has a name: "overload set". It keeps you from
accidentally calling a function you had no idea existed, for
example because of a name clash.
Is there any workaround?
Yes, the error message is very
I have a struct `A` that stores delegates. The problem is that
I'm getting "`Error: closures are not yet supported in CTFE`" if
I create an compile-time constant value of type `A`:
```d
struct A
{
void delegate()[] dg;
}
auto createDelegate(string s)
{
return { s.writeln; }; //
On 12/7/21 7:43 AM, Rumbu wrote:
On Friday, 3 December 2021 at 10:57:34 UTC, Stanislav Blinov wrote:
On Friday, 3 December 2021 at 10:42:37 UTC, Rumbu wrote:
Bug or feature? Is there any workaround?
The error message explains what to do :)
Error: class `mixinover.AnotherVisitor` use of
On Friday, 3 December 2021 at 10:57:34 UTC, Stanislav Blinov
wrote:
On Friday, 3 December 2021 at 10:42:37 UTC, Rumbu wrote:
Bug or feature? Is there any workaround?
The error message explains what to do :)
Error: class `mixinover.AnotherVisitor` use of
`mixinover.Visitor.visit(S s)` is