This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/63329] New: std::bind does not define argument_type
- From: "thomas.sanchz at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Sep 2014 11:30:22 +0000
- Subject: [Bug libstdc++/63329] New: std::bind does not define argument_type
- Auto-submitted: auto-generated
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.