Boost logo

Boost :

From: Alexander (al_at_[hidden])
Date: 2006-04-28 09:37:01


"Marcin Kalicinski" <kalita_at_[hidden]> wrote in message
news:<e2t2kb$6ja$1_at_[hidden]>...

> 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
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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk