Re: hijacking a class's members

2010-08-04 Thread Rory Mcguire
Mafi wrote: >> Thats what feels weird to me. a.x can result in different things >> happening even though x exists in both A and the generated class. However >> the generated class has two "fields" called x one you can't access >> anymore and the @property one. >> When I create an instance of the g

Re: hijacking a class's members

2010-08-04 Thread Stanislav Blinov
04.08.2010 14:11, Rory Mcguire wrote: Hi, The code below is my beginning to attempt a class which implements any class and throws an exception if one tries to access any member of that class. Problem is that if I use: auto a1 = noinit!(A)(); it works and accesses the int x() {...} member of t

Re: hijacking a class's members

2010-08-04 Thread Mafi
Thats what feels weird to me. a.x can result in different things happening even though x exists in both A and the generated class. However the generated class has two "fields" called x one you can't access anymore and the @property one. When I create an instance of the generated class I would expe

Re: hijacking a class's members

2010-08-04 Thread Rory Mcguire
Mafi wrote: > Am 04.08.2010 12:11, schrieb Rory Mcguire: >> Hi, >> >> The code below is my beginning to attempt a class which implements any >> class and throws an exception if one tries to access any member of that >> class. >> >> Problem is that if I use: >> auto a1 = noinit!(A)(); >> >> it work

Re: hijacking a class's members

2010-08-04 Thread Mafi
Am 04.08.2010 12:11, schrieb Rory Mcguire: Hi, The code below is my beginning to attempt a class which implements any class and throws an exception if one tries to access any member of that class. Problem is that if I use: auto a1 = noinit!(A)(); it works and accesses the int x() {...} member

hijacking a class's members

2010-08-04 Thread Rory Mcguire
Hi, The code below is my beginning to attempt a class which implements any class and throws an exception if one tries to access any member of that class. Problem is that if I use: auto a1 = noinit!(A)(); it works and accesses the int x() {...} member of the generated class, but if I use: A a1 =