|
Boost : |
Subject: Re: [boost] the best possible c++ properties (implementation).
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2010-03-01 15:51:53
Daniel Larimer wrote:
> Best possible properties would have 0 per-instance overhead in either size or construction/destruction. Such a
> solution is possible and I hope to share it with the board soon. But put your mind to work and I am sure you can figure it out as I did in 30 minutes or less. It does require the use of macros however.
Boost.Test has RO, RW properties (no setter/getters) with 0 size
overhead. Syntax: obj.prop for read access, obj.prop.value for write
access. It has some pros and cons, and I am open for more
general/powerful alternative.
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk