This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/48113] [4.6/4.7 Regression] [C++0x] bind with tuple argument fails


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48113

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-14 17:24:36 UTC ---
SFINAE is not removing an overload; it doesn't work like that.  SFINAE only
applies to function templates, not non-template member functions of class
templates.  It's just that for some reason we aren't complaining about the
functor case.  Reduced further:

struct A { };
volatile A& f();

struct F1
{
  void operator()(A);
};

typedef void (*F2)(A);

typedef decltype (F1()(f())) t1;
typedef decltype (F2()(f())) t2;

The inconsistency is odd.  I would expect both lines to give an error.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]