|
Boost : |
Subject: Re: [boost] enable_if and non-template member functions?
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-08-08 11:11:18
on Sat Aug 06 2011, Matt Calabrese <rivorus-AT-gmail.com> wrote:
> C++0x has a simple answer to this -- default function template template
> arguments.
<snip>
> There are two sort of subtle things here. First, the sizeof( A ) != 0 part
> is to force the condition to be dependent on a template argument. The other
> subtle thing is that the second template argument is a non-type template
> argument.
And this you're calling "simple?"
> It was suggested that a macro should be made to hide the
> subtleties and make things more concise. In this situation it seems like it
> would simplify things a lot. I'll put something together and make sure it
> all gets to Release.
+1
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk