[Bug libstdc++/91371] New: std::bind and bind_front don't work with function with call convention
roland at rschulz dot eu
gcc-bugzilla@gcc.gnu.org
Mon Aug 5 17:17:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91371
Bug ID: 91371
Summary: std::bind and bind_front don't work with function with
call convention
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: roland at rschulz dot eu
Target Milestone: ---
If a function with call convention function type attribute is passed to
bind/bind_front it fails.
Reproducer:
#include<functional>
int bar(int) __attribute__((ms_abi)); //same with fastcall, thiscall
void test() {
std::bind(bar, 5)(); //error: function returning a function
std::bind_front(bar, 5)(); //error: static assertion failed
}
Godbolt showing it works with libc++:
https://godbolt.org/z/3g7Vk7
More information about the Gcc-bugs
mailing list