3 ms·
i don't think that std::bind is that difficult to understand - here's some stuff about it i wrote earlier: https://latedev.wordpress.com/2012/08/06/using-stdbin
by zabzonk 3y ago
i don't think that std::bind is that difficult to understand - here's some stuff about it i wrote earlier: https://latedev.wordpress.com/2012/08/06/using-stdbind-for-fun-and-profit/ https://latedev.wordpress.com/2012/08/06/using-stdbind-for-f...
- vitus 3y agoIf your codebase supports C++20, then std::bind_front, std::bind_back are superior alternatives. Among other things, you then no longer need to use the _1, _2, ... placeholders if you want partial function application. But surely GP cannot be talking about std::bind in the context of > Ever since C++ got lambdas, I would say that bind should be considered deprecated since both came about in C++11. Given the context of the article, GP is most likely talking about boost::bind, which was intended as a replacement API for std::bind1st, std::bind2nd (which were deprecated in C++11 and removed in C++17), and largely fills the same niche that std::bind does (except with surprisingly many caveats / differences between the two).