On Sunday, 10 July 2016 at 07:20:29 UTC, Meta wrote:
On Friday, 8 July 2016 at 09:01:10 UTC, Marc Schütz wrote:
`foo()` is effectively a delegate, therefore `const` applies
to the context.
AFAIK const on a function can only ever refer to the `this`
pointer, but there is no `this` pointer.
T
On Sunday, 10 July 2016 at 07:20:29 UTC, Meta wrote:
On Friday, 8 July 2016 at 09:01:10 UTC, Marc Schütz wrote:
`foo()` is effectively a delegate, therefore `const` applies
to the context.
AFAIK const on a function can only ever refer to the `this`
pointer, but there is no `this` pointer.
W
On Friday, 8 July 2016 at 09:01:10 UTC, Marc Schütz wrote:
`foo()` is effectively a delegate, therefore `const` applies to
the context.
AFAIK const on a function can only ever refer to the `this`
pointer, but there is no `this` pointer.
On Thursday, 7 July 2016 at 15:02:29 UTC, Jonathan M Davis wrote:
On Thursday, July 07, 2016 10:33:39 Basile B. via
Digitalmars-d-learn wrote:
this compiles without error:
struct Foo
{
int i;
void bar()
{
void foo() const
{
i = 1;
}
On Thursday, July 07, 2016 10:33:39 Basile B. via Digitalmars-d-learn wrote:
> this compiles without error:
>
>
> struct Foo
> {
> int i;
> void bar()
> {
> void foo() const
> {
> i = 1;
> }
> foo;
> }
> }
>
> In this case "const"
On Thursday, 7 July 2016 at 12:24:08 UTC, Edwin van Leeuwen wrote:
On Thursday, 7 July 2016 at 10:33:39 UTC, Basile B. wrote:
this compiles without error:
struct Foo
{
int i;
void bar()
{
void foo() const
{
i = 1;
}
foo;
}
}
In this
On Thursday, 7 July 2016 at 10:33:39 UTC, Basile B. wrote:
this compiles without error:
struct Foo
{
int i;
void bar()
{
void foo() const
{
i = 1;
}
foo;
}
}
In this case "const" seems to be a noop. Do you think it's a
bug ? Shouldn'
On 07/07/2016 12:33 PM, Basile B. wrote:
Do you think it's a bug ?
Yes.
this compiles without error:
struct Foo
{
int i;
void bar()
{
void foo() const
{
i = 1;
}
foo;
}
}
In this case "const" seems to be a noop. Do you think it's a bug
? Shouldn't "const" be applied, despite of foo() inaccessibility ?