https://bugs.documentfoundation.org/show_bug.cgi?id=93243

            Bug ID: 93243
           Summary: replace boost::bind with C++11 lambdas
           Product: LibreOffice
           Version: 5.1.0.0.alpha0+ Master
          Hardware: Other
                OS: All
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-b...@lists.freedesktop.org
          Reporter: mst...@redhat.com
                CC: libreoffice@lists.freedesktop.org

boost::bind is used to create function objects.

the bundled boost headers require a lot of patches to suppress warnings
so it would reduce the maintenance burden here to use standard C++11
features instead, and it would also make incremental rebuilds faster
whenever boost is modified/patched.

C++11 has both built-in lambda syntax to create function objects,
and std::bind in <functional> which is very similar to boost::bind.

the C++11 lambdas have the advantage that they are built-in
syntax so are the fastest to compile; they are also often
easier to read in the more complex nested boost::bind cases.

there is one obscure pit-fall here: in very rare cases the function is
passed as an argument to a preprocessor macro.  lambdas may not work
in this case because the preprocessor interprets commas in the
capture list as macro argument separators and compilation fails.
use std::bind in such cases.

to find the offending code just "git grep boost::bind"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to