
Zitat von Joel de Guzman <joel@boost-consulting.com>:
class foo { public:
int x() const; void x(int n); int y() const; void y(int n);
private: // encapsulated };
Now, adapt that class to fusion.
is the goal a (mutable) fusion sequence with value type int? then there is no solution, as the class only exposes the value of its members. if the goal is just any representation of the class in sequence form, I'd suggest to make the (now transparent) proxy object visible to the user. that way even functors that require a reference to the value can be applied to a class, by plugging in something like template<...> struct transform_property{ template<typename T> void operator()(property<T> prop) const{ T tmp=prop.get(); base(tmp); prop.set(tmp); } }; with property<> being the proxy object. my case could then support sequences created using ADAPT_CLASS/ADAPT_whatever similarily. -Stefan