On May 22, 2014, at 11:20 PM, Justin Bogner <[email protected]> wrote:

> Richard Smith <[email protected]> writes:
>> On Wed, May 21, 2014 at 8:57 PM, Justin Bogner <[email protected]> wrote:
>>      #include <functional>
>>      struct A {
>>          int foo(int) const { return 1; }
>>      };
>>      void foo() {
>>          std::function<int(const A*, int)> f = &A::foo;
>>      }
>> 
>>    This no longer compiles. Is it a problem in libc++, or with this change?
>> 
>> This is a bug in libc++'s is_function implementation; it doesn't do the right
>> thing for function types with cv-qualifiers or a ref-qualifier.
> 
> Okay, so if I understand correctly, the change in behaviour is that this
> should return true and is now returning false:
> 
>  std::is_function<int (int) const>::value

Actually, what I’m seeing is that const member functions are failing to compile:

        std::is_member_function_pointer<A::void (*) (int) const>::value

> and the problem is that your change has exposed a bug in libc++ where
> itt isn't doing the right thing here. Is this correct?

I’m willing to believe that - but I’m still investigating.

— Marshall


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to