From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-01-22 14:22:56


"Daniel Wallin" <dalwan01_at_[hidden]> wrote in message
news:400F9A69.4050000_at_student.umu.se...
> Jonathan Turkanis wrote:
> > "Daniel Wallin" <dalwan01_at_[hidden]> wrote in message
> >>You almost certainly don't want this. If you need to generate the
> >>deleter type somehow, make it a metafunction class.
> >
> >
> > I stay away from template template parameters most of the time,
for
> > the sake of old compilers. But here we're relying heavily on
SFINAE,
> > so I don't see the need.
>
> Actually we are not really relying on SFINAE at all. I got it
working on
> VC7, and likely it won't break on VC6 either.
>

Are you sure? I used SFINAE a lot, and that's what it looked like to
me. If not, I'm embarassed. Why doesn't it work on Codewarrior 8.0?

> > In one of my earlier posts the policies were
> > (implicitly) metafunction classes, but when I actually sat down to
> > write them it seemed to make the code needlessly obscure. I'm
trying
> > to be careful not to complicate things too much ;-). Its no big
deal
> > to switch later.
>
> There's more reasons than support for old compilers to go for
> metafunction classes though, check out the MPL paper.

I've read the MPL paper -- I'm not sure the same consideration apply
here in full force. Anyway, I may switch back to metafunction classes
to accommodate Howard Hinnant's deleters smoothly.

BTW, my attempts to eliminate the extra pointer in Bronek's
implementation failed: I couldn't provide a no throw guarantee on copy
constuctors. :-( (I came close, but close doesn't count here.)

I may eventually come around to your view on deleters, but I'm not
there yet.

Regards,

Jonathan