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

Dante Doménech dante19031999 at gmail.com
Fri Jan 8 15:15:14 UTC 2021


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
<https://opengrok.libreoffice.org/xref/core/>/include
<https://opengrok.libreoffice.org/xref/core/include/>/sal
<https://opengrok.libreoffice.org/xref/core/include/sal/>/types.h
<https://opengrok.libreoffice.org/xref/core/include/sal/types.h>







El vie, 8 ene 2021 a las 9:37, Stephan Bergmann (<sbergman at redhat.com>)
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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20210108/45fbf0dc/attachment.htm>


More information about the LibreOffice mailing list