CTFE can't replace @properties
12345swordy
alexanderheistermann at gmail.com
Thu Oct 8 19:47:49 UTC 2020
On Thursday, 8 October 2020 at 19:45:15 UTC, H. S. Teoh wrote:
> On Thu, Oct 08, 2020 at 04:47:07PM +0000, 12345swordy via
> Digitalmars-d wrote:
>> On Thursday, 8 October 2020 at 16:11:02 UTC, H. S. Teoh wrote:
>> > On Thu, Oct 08, 2020 at 03:21:57PM +0000, 12345swordy via
>> > Digitalmars-d wrote:
>> > > [...]
>> > [...]
>> >
>> > I'm having a hard time understanding what you're trying to
>> > say. Could you post some code that illustrates the problem?
> [...]
>> int _x;
>> public
>> int x () { return _x; }
>> int x (int x) { this._x = x; }
>>
>> x += 2; // you can't do this.
>> x++ //nor this.
>
> Operator overloading is only supported by the opXxx member
> functions. This is by design. But I don't understand what this
> has to do with CTFE?
>
>
> T
It turns out that it has nothing to do with the CTFE. It simply a
limitation that @propertiy is supposed to address.
More information about the Digitalmars-d
mailing list