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++/63329] New: std::bind does not define argument_type


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63329

            Bug ID: 63329
           Summary: std::bind does not define argument_type
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thomas.sanchz at gmail dot com

Hi,

It looks like the data structure returned by bind does not contain some type
(argument_type) required by std::not1 for instance.
It works with clang + the libc++ on Mac Os X.

#include <functional>
#include <algorithm>

struct Test { bool pred() const { return true; } };
int main(int argc, char *argv[])
{
  // works
  auto f1 = std::not1(std::mem_fn(&Test::pred));
  // works
  auto f2 = std::not1(std::mem_fun(&Test::pred));
  // does not work: error: no type named âargument_typeâ 
  auto f3 = std::not1(std::bind(&Test::pred, std::placeholders::_1));
}


Thanks a lot.

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