HibernateD and DDBC - ORM and DB abstraction layer for D
Jacob Carlborg
doob at me.com
Fri Apr 5 08:20:03 PDT 2013
On 2013-04-05 16:03, Vadim Lopatin wrote:
> 2) Read/write property
> @property T someProperty() { ... }
> @property xxx someProperty(T value) { ... }
> treated as property with name 'someProperty'
>
> BTW, I don't know how to check if property is read/write in compile time.
If there's no better way you can always use __traits(compiles),
something like this:
__traits(compiles, { auto c = new Class; T v = c.someProperty;
c.someProperty = T.init; });
Currently that will compile regardless of @property or not.
--
/Jacob Carlborg
More information about the Digitalmars-d-announce
mailing list