> However, I want to hide the constructor of 'member_accessor' so that
> only the container class C can initiate object of type
> member_accessor
Not sure how to do it conveniently, but just wondering why are you
trying to do it? The only thing the member_accessor will be able to do
is to call get_x, set_x which are public anyway and could be called
directly. I would argue it would be sometimes interesting (or at least
funny) to make the accessor object a member of a different class than
the host class of your properties.
Neat idea, by the way! I wonder where it will take you. Let us know.
-Pavel