
Hi! Is there such a class in boost? What I'm thinking of is fairly simple, it could be written easily with type_traits and mpl::if_, but I prefer using the standard boost components, if they exist. select_parent<T1, T2>::type is a) T1 if T1 is T2's (direct or indirect) parent b) T2 if it is the other way round c) T1 if T1 and T2 are the same d) and generates some compiler error if T1 and T2 are not related at all. Thx, Agoston

Agoston Bejo wrote:
Hi! Is there such a class in boost?
I don't think so.
What I'm thinking of is fairly simple, it could be written easily with type_traits and mpl::if_, but I prefer using the standard boost components, if they exist.
Those _are_ standard boost components, though. It isn't clear to me that Boost should also include every possible useful combination of its components. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (2)
-
Agoston Bejo
-
David Abrahams