python::object && mpl
Arnaldur Gylfason
arnaldur at decode.is
Fri Jan 11 15:28:08 CET 2002
Dave,
I've glanced through mpl and have a rough idea about it's function.
>From what I gather, the use_generator is the Glue function class and the
generators have to support templated inheritance but don't need to be
function classes.
The following design should be possible:
template <class T, bool checked, class Base>
indexable : Base
{
proxy operator[](...
...
};
...
template <class...., checked>
struct object
: gen_linear_hierarchy<
typename get_unique_generators<mpl::type_list<c1,c2...cn> >::type
, use_generator<
object<c1,c2,c3...cn>, checked>
>
>
{
};
...
template <class Object,checked>
struct use_generator
{
template <class Generator, class Base>
struct apply
{
typedef Generator<Object,checked,Base> type;
};
};
Is my understanding correct?
What design would you opt for?
Cheers
Arnaldur
More information about the Cplusplus-sig
mailing list