
----- Original Message ----- From: "Steven Watanabe" <watanabesj@gmail.com> To: <boost@lists.boost.org> Sent: Wednesday, January 27, 2010 6:32 PM Subject: Re: [boost] detecting a constructor with a specific signature
AMDG
vicente.botet wrote:
"Kenny Riddile" <kfriddile@yahoo.com> wrote:
Alas, I'm using VC9. The first declaration of select() gives me the following error:
error C2564: 'T' : a function-style conversion to a built-in type can only take one argument
Hi,
have you tried to double ()
template< typename T > typename result< sizeof T(( make< const std::string& >(), make< Foo& >() )) >::type select( int );
That doesn't try the same constructor.
The problem is that this method requires extended SFINAE which VC9 doesn't support.
You are right, my proposal test if there is a constructor with an argument Foo&, isn't it? I confirm it works for gcc-4.4.0 and fails to compile for gcc-4.3.2 and MSVC v9. Steven, does this mean that it is possible to implement the trait with a good C++98 compiler? Or there are other things missing yet? Thanks, Vicente