
6 Feb
2011
6 Feb
'11
10:15 p.m.
Ref<PlugableDeviceC> plugable_device = devices[0].castTo<PlugableDeviceC>();
I improved a little my design and I got rid of Ref<Concept> and now normal references can be used instead of them. The thing that doesn't work is derived-to-base conversion in shared_ptr, like this: shared_ptr<BaseConcept> sptr(derived_concept_instance); If I solve this very problem, I could make work every concept and its refinements in a very natural way.