
16 Apr
2011
16 Apr
'11
10:23 a.m.
On 16/04/2011 12:11, Robert Jones wrote:
On Fri, Apr 15, 2011 at 4:13 PM, Jeroen Habraken<vexocide@gmail.com> wrote:
Hi,
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 than true/false as the phrasing of the resulting function identifier tends to be less crisp.
if ( doesItWork( )== yes )....
vs
if ( itWorks( ) )....
They need to be differently sized types so that you can use sizeof to distinguish which function overloads gets picked up.