We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code
#include <functional> template<int I> struct lambda2_arg { }; constexpr lambda2_arg<1> _1{}; namespace std { template<int I> struct is_placeholder< lambda2_arg<I> >: integral_constant<int, I> { }; } // namespace std struct plus_equal { template<class T1, class T2> decltype(auto) operator()(T1&& t1, T2&& t2) const { return std::forward<T1>(t1) += std::forward<T2>(t2); } }; struct X { int m; }; int main() { X x{ 1 }; return std::bind( plus_equal(), std::bind( &X::m, _1 ), 1 )( x ); }
(https://godbolt.org/z/8h1Td56c7)
fails to compile. Other standard libraries work. Using std::placeholders::_1 instead of _1 works.
(This bind expression is produced by Boost.Lambda2.)
The text was updated successfully, but these errors were encountered:
This works: static_assert (std::is_placeholder< lambda2_arg<1>>::value, "");
This fails: static_assert (std::is_placeholder<const lambda2_arg<1>>::value, "");
Sorry, something went wrong.
This is now https://reviews.llvm.org/D116388
07a0b0e
Quuxplusone
No branches or pull requests
Extended Description
The code
(https://godbolt.org/z/8h1Td56c7)
fails to compile. Other standard libraries work. Using std::placeholders::_1 instead of _1 works.
(This bind expression is produced by Boost.Lambda2.)
The text was updated successfully, but these errors were encountered: