Subject: Re: [boost] SFINAE yes_type and no_type
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-04-16 06:23:00
On 16/04/2011 12:11, Robert Jones wrote:
> On Fri, Apr 15, 2011 at 4:13 PM, Jeroen Habraken<vexocide_at_[hidden]> wrote:
>> Is there a specific yes_type and no_type inside boost that I should be
>> using when writing a SFINAE test? There seem to be quite a few defined
>> already and reinventing the wheel (albeit it being trivial) again
>> doesn't make sense.
> There's true and false types, would that do? Yes/no is generally less clear
> true/false as the phrasing of the resulting function identifier tends to be
> less crisp.
> if ( doesItWork( )== yes )....
> if ( itWorks( ) )....
They need to be differently sized types so that you can use sizeof to
distinguish which function overloads gets picked up.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk