Re: Warnings about Boost (warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It can be solved adding:

#ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#endif

Before the inclusion. However, taking a look to Jenkins there are many files affected.
So I would suggest to do it in a header /core/include/sal/types.h







El vie, 8 ene 2021 a las 9:37, Stephan Bergmann (<sbergman@xxxxxxxxxx>) escribió:
On 07/01/2021 19:01, julien2412 wrote:
> On pc Debian x86-64 with master sources updated today + make clean && make
> (since Boost has been upgraded), I noticed these kinds of warnings:
> [CXX] svx/source/fmcomp/fmgridif.cxx
> In file included from
> /home/julien/lo/libreoffice/svx/source/xoutdev/xattr.cxx:87:
> In file included from
> /home/julien/lo/libreoffice/external/boost/include/boost/property_tree/json_parser.hpp:30:
> In file included from
> /home/julien/lo/libreoffice/workdir/UnpackedTarball/boost/boost/property_tree/json_parser.hpp:16:
> In file included from
> /home/julien/lo/libreoffice/workdir/UnpackedTarball/boost/boost/property_tree/json_parser/detail/read.hpp:13:
> In file included from
> /home/julien/lo/libreoffice/workdir/UnpackedTarball/boost/boost/property_tree/json_parser/detail/parser.hpp:7:
> In file included from
> /home/julien/lo/libreoffice/external/boost/include/boost/bind.hpp:30:
> /home/julien/lo/libreoffice/workdir/UnpackedTarball/boost/boost/bind.hpp:36:1:
> warning: The practice of declaring the Bind placeholders (_1, _2, ...) in
> the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using
> namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to
> retain the current behavior. [-W#pragma-messages]
> BOOST_PRAGMA_MESSAGE(
> ^
> /home/julien/lo/libreoffice/workdir/UnpackedTarball/boost/boost/config/pragma_message.hpp:24:34:
> note: expanded from macro 'BOOST_PRAGMA_MESSAGE'
> # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
>                                   ^
> <scratch space>:36:2: note: expanded from here
>   message("The practice of declaring the Bind placeholders (_1, _2, ...) "
> "in the global namespace is deprecated. Please use " "<boost/bind/bind.hpp>
> + using namespace boost::placeholders, " "or define
> BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.")
>   ^
[...]
> It doesn't prevent LO from building but thought it could be interesting to
> pinpoint.

Yeah, that's a general issue since
<https://git.libreoffice.org/core/+/e0f1b5bd94550835c639efda4e4c9a801c78dbe9%5E!/>
"Upgrade external/boost to latest Boost 1.75.0".  But as it doesn't
affect --enable-werror, I didn't deem it worthwhile to silence the noise
by ignoring -W#pragma-messages in bin/gen-boost-headers (and whatever
would be necessary for MSVC).  If we hate the noise enough, though, we
could presumably patch external/boost's json_parser according to the
pragma message ("use <boost/bind/bind.hpp> + using namespace
boost::placeholders").

_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux