- status changed from new to accepted
- milestone set to 1.1.0
base class aliases, as described in this proposal:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2881.html
Sure, this should be possible. I've entered a ticket for it:
I'd propose the following syntax (given that these are essentially typedefs), now in C++:
template< typename T, class CloneAlloc, class Alloc>
class ptr_vector
: public ptr_sequence_adapter<T, std::vector<void*, Alloc>, CloneAlloc>
{
typedef ptr_sequence_adapter<T, std::vector<void*, Alloc>, CloneAlloc>
base_class;
// base_class visible here (2)
// ...
};
In N2881:
template< typename T, class CloneAlloc, class Alloc>
class ptr_vector
: base_class = public ptr_sequence_adapter<T, std::vector<void*, Alloc>, CloneAlloc>
// base_class visible here (1)
{
// base_class visible here (2)
// ...
};
In a future Boost.Contract:
CONTRACT_CLASS(
template< typename T, class CloneAlloc, class Alloc >
class (ptr_vector)extends(
typedef (public ptr_sequence_adapter<T, std::vector<void*, Alloc>,
CloneAlloc>) base_class
)
// maybe base_class visible here (1)...
) {
// base_class visible here (2)
// ...
};
I don't know if I can make base_class visible in the remaining base class list (1) (maybe I can... I'll have to see when implementing this) but I can definitely make it visible in the base class declaration (2) (as a typedef with the access level suggested by N2881).
Log in to post a comment.