Subject: Re: [boost] [type_traits][parameter] Inconsistent boost::is_convertible between gcc and clang
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-08-19 10:48:45
John Maddock wrote:
>> There three fixes for `is_convertible<From, To>` in the new code.
>> A. `To` is a function type.
>> B. `From` is an rvalue in C++11.
>> C. `From` is an rvalue in C++03.
>> Patches (of the code and test) for A are attached in
>> Since it is trivial to fix, may I commit it?
> Looks OK, yes please do go ahead.
> I'm not sure, the old code uses:
> The new one uses:
> I'm not sure if that counts as a SFINAE expression or not, but I remember
> similar code causing problems with MSVC (and probably others) when it was
> tried in type traits in the past. So I'm being extra careful!
I think if `sizeof(test_proc(variable))` works then
`sizeof(test_proc(function_call()))` works too.
But, OK, I don't know about VC++, so I use your code:
I created a trac ticket at
(is_convertible works incorrectly for rvalue source types)
and attached a patch for C++11 there
I'll make a patch for C++03 after the patch for C++11 is accepted.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk