[Bug libstdc++/79798] New: [7 Regression] std::bind uses wrong value category with result_of
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 1 23:48:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79798
Bug ID: 79798
Summary: [7 Regression] std::bind uses wrong value category
with result_of
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
Another case like PR 79486, this fails to compile with trunk:
#include <functional>
struct X { };
const X f(int);
struct Y {
void operator()(X&&) = delete;
int operator()(const X&&);
};
auto b = std::bind(Y(), std::bind(f, std::placeholders::_1));
auto i = b(1);
x.cc:12:13: error: no match for call to ‘(std::_Bind<Y(std::_Bind<const X
(*(std::_Placeholder<1>))(int)>)>) (int)’
auto i = b(1);
^
More information about the Gcc-bugs
mailing list