Subject: Re: [boost] New, powerful way to use enable_if in C++0x
From: Jeremy Maitin-Shepard (jeremy_at_[hidden])
Date: 2011-04-12 16:34:57
On 04/12/2011 01:02 PM, Matt Calabrese wrote:
> On Tue, Apr 12, 2011 at 12:56 PM, Stewart, Robert<Robert.Stewart_at_[hidden]>wrote:
>> That's a minor issue, compared to *& on the end which, as you noted
>> previously, is unusual, and is easy to forget. Consider the error messages
>> if one forgets to add *&.
> Yeah, I think I agree. In 0x, there's also not much reason to use the old
> forms of enable_if as well other than portability to old compilers, so not
> making new templates for the reasons I mentioned would probably be silly in
> the long run. Seconding the idea of just making new templates.
It seems that template aliases would further improve the syntax, but
they are not yet supported by any compilers as far as I know.
A macro could also lead to much shorter syntax.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk