Bug 165234 - Use lambdas instead of boost::bind
Summary: Use lambdas instead of boost::bind
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2025-02-13 14:36 UTC by Hossein
Modified: 2025-02-13 14:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2025-02-13 14:36:21 UTC
Description:
There are various places in the code where boost:bind is used. Nowadays, C++ standard library provides std::bind. But, as described in tdf#165233, it is preferred to use lambdas instead of std::bind.

$ git grep boost::bind|wc -l
35

The task here is to convert usages of boost::bind to lambda expressions. You can pick one of the above instances, and change it to use lambdas. You have to make sure that the code behavior remains the same after your change.

Example:
This is an example of such a change in LibreOffice C++ code, in filter module.

filter: convert boost::bind 577b4e499b870a8afd56f2d9ac1fe0313162bf8d

More information:

Boost.Bind
https://www.boost.io/library/latest/bind/

Lambda expression in C++
https://www.geeksforgeeks.org/lambda-expression-in-c/