$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David B. Held (dheld_at_[hidden])
Date: 2003-08-09 14:24:47
"David Abrahams" <dave_at_[hidden]> wrote in message
news:uvft780gk.fsf_at_boost-consulting.com...
> [...]
> Lambda "adds the type" for cases like std::vector<_1>.
> Metafunction classes, though, are supposed to be the super-
> efficient way to do things, so having the library perform extra
> template instantiations to detect the nested ::type would
> probably not be appropriate there.
Ok, that's good to know. It looks like the policy adaptor is
causing longer compile times, so converting to metafunction
classes should actually improve that?
> BTW, normally, you might:
>
> struct Policy
> {
> template <class P>
> struct apply
> {
> typename some_other_class type;
> };
> };
>
> if nothing else, just to cut down on symbol size (you don't want
> to see Policy::apply<...> in your error messages when it could
> be some_other_class<...>).
I guess I don't understand what the nested type is for when you
aren't really doing a meta-computation, so I don't know what an
appropriate type for "some_other_class" would be. Are you
saying it can be any arbitrary type at all, since I'm not using the
"metafunction result"? And that I should make it descriptive so
that I don't just see a bunch of references to ::apply (which is
going to get annoying when you have problems in more than one
policy)?
Dave