Re: [boost] property tree & registry approach

My answer is quite short, but I discovered a major flaw with the approach you propose, and it renders most of it unimplementable. Please see below:
May be it will be interesting to compare another approach to the
"Marcin Kalicinski" <kalita@poczta.onet.pl> wrote in message news:<e2t2kb$6ja$1@sea.gmane.org>... proposed
Property Tree Library.
class basic_registry_proxy { public: ... template<class T> virtual bool get(const path, T&) const = 0;
No can do. Virtual functions cannot be templates!
This rules out automatic type conversions. It would have to rely on something else to provide it.
You are absolutely right. At my implementation basic_registry_proxy has only simple get/set functionality: virtual bool get(const path, string&) const = 0; Template function belongs to wrapper which contains pointer to basic_registry_proxy. I was trying to simplify my class hierarchy and produce silly indeed interface. I am sorry. Regards, Alexander
participants (1)
-
Alexander