>>>> "Théo" == Thierry GERAUD
<theo(a)lrde.epita.fr> writes:
Théo> Roland Levillain wrote:
> There are still things to be improved, but at
least we have (almost)
> all the desired functionality. The missing features that I can see
> ...
> +# define mlc_super_(T) \
> + set_super_type<T>::ret
Théo> do we really need to distinguish between set_super and get_super?
In fact, mlc_set_super may be absolutely useless, particularly if you
consider template classes. In fact, I don't think it'd be worth to
write shortcut macros like these:
# define mlc_set_super_1(Type, Param, Super) \
template <typename Param> \
struct set_super_type<Type < Param> > \
{ \
typedef Super<Param> ret; \
}
# define mlc_set_super_2(Type, Param1, Param2, Super) \
template <typename Param1, typename Param2> \
struct set_super_type<Type < Param1, Param2 > > \
{ \
typedef Super<Param1, Param2> ret; \
}
(there are just too many cases!).
In addition, mlc_super is just some sugar to shorten the code (avoid
::ret) when there is a single super class. I don't know if we can
write an equivalent sugar for multiple inheritance.
IMHO, we could get rid of mlc_set_super, but we should keep
mlc_super/mlc_super_.