Description: std::bind is a mechanism in C++ to bind specific arguments to an existing function or function object. It is helpful to define a new function that gets fewer/different parameters but does the same thing. The parameters are forwarded to the actual underlying function alongside some other values. https://en.cppreference.com/w/cpp/utility/functional/bind Although std::bind is handy in some cases, it presents various drawbacks, including: 1. Reduced readability: std::bind reduces readability, as it uses syntax like std::placeholders::_1 without a meaningful name. 2. Runtime performance overhead: std::bind introduces runtime overhead. 3. Harder debugging: due to the specific syntax, it is harder to debug and find problems when dealing with function calls. 4. Issues with overloading: using std::bind, one needs to do explicit casting, which complicates using overloaded functions. One advice is to use lambdas instead of std::bind. There are many places in LibreOffice code where std::bind is used, and the task here is to change those instances to lambda. $ git grep std::bind | wc -l 81 You can pick an instances of using std::bind, and use lambdas to do the exact same thing. You have to make sure that the code behavior remains the same after your change. Example: This is an example code, which shows how to define lambda where std::bind was used before: Use lambda instead of std::bind + wrapper function 81e9703cf8f891bfb36f52eb24e0e18ca13d373a More information: For understand std::bind and lambdas better, and to see some examples, please refer to the relevant C++ documentation. These are some useful links: std::bind https://en.cppreference.com/w/cpp/utility/functional/bind Lambda expression in C++ https://www.geeksforgeeks.org/lambda-expression-in-c/ Lambda Vs Binders in C++ STL https://www.geeksforgeeks.org/lambda-vs-binders-in-cpp-stl/
Simon Chenery committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/39c6e59938f634c2fe40d81620c43a00a1f0e380 tdf#165233 replace std::bind and helper function with lambda It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
ArsalanKhan04 committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5db7fb3c7560f883bc0e2882e34904d9b8d7bd0f tdf#165233 Use lambdas instead of std::bind It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Devashish Gupta committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/52225dfaeb78d2c99dfa7b2ef140183accf668a2 tdf#165233 Use lambdas instead of std::bind It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Karthik committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5a3dd3f0b1e83eca0984b2458fc0f6ee2eb49e4e tdf#165233 Use lambdas instead of std::bind It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Zainab Abbasi committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/dcbf347c6d8c57361dbecdd5891630e5afd42860 tdf#165233 Use lambdas instead of std::bind It will be available in 25.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Don't assign multi-hacker tasks to yourself, simply work on them.