Boost logo

Boost :

From: Ruben Perez (rubenperez038_at_[hidden])
Date: 2025-05-03 13:56:08


Some further questions:

1. I've tried playing with custom RTTI, because that's what the clang AST
API uses. When implementing boost_openmethod_vptr, I used
default_policy::static_vptr<T>. But that seems to defeat the purpose of
policies and scoping - is there a way to obtain the policy that invoked
boost_openmethod_vptr?

2. It sounds strange to me that policies have two functions: a. they behave
behavior (e.g. what to do in case of error) and b. they act as a type
registry. That confused me a lot, because in other libraries I got the
impression that policies only do a. Is there anything preventing the
separation of concerns here?

3. Some of the complexity with policies (like needing a fork function) seem
to be stemming from the point above. What do you think? For instance,
couldn't facets be made regular members? Then add/fork can be implementing
by just inheriting from a base policy, using regular C++.

4. I had the same impression as Joaquin that virtual_ should be used to
mark virtual arguments in method definitions, and virtual_ptr and regular
references in overriders. What do you think?

5. I got the impression that virtual_ptr can't be used with custom RTTI. Is
that true?

Thanks,
Ruben.


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