lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Getting rid of the rest of Boost


From: Vadim Zeitlin
Subject: Re: [lmi] Getting rid of the rest of Boost
Date: Sun, 24 Oct 2021 13:31:06 +0200

 Hello,

 I'm finally sending this email, which I wrote almost 3 weeks ago, but
somehow forgot to send -- and only realized this after seeing your question
about the remaining warning. I think my ideas for getting rid of this
warning are still relevant, even though the rest of the message is, by now,
somewhat of date, so I'm sending it without any changes. Sorry again for
not having done this much earlier.


On Wed, 6 Oct 2021 21:10:22 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:

GC> On 10/3/21 10:13 PM, Vadim Zeitlin wrote:
GC> [...]
GC> > only the following Boost parts are still used (all in the tests):
GC> > 
GC> > 1. boost::numeric_cast in bourn_cast_test.cpp
GC> [...]
GC> > 2. boost::numeric::ublas::vector in expression_template_0_test.cpp
GC> [...]
GC> > 3. boost::lexical_cast in
GC> >  (a) value_cast_test.cpp
GC> >  (b) numeric_io_test.cpp
GC> 
GC> Thanks, those all now depend on macros that are not defined.
GC> 
GC> The boost library has been eradicated from lmi

 Excellent, thanks a lot! Christmas came early this year. I don't even
remember when had we formulated the plan to remove dependency on Boost
first, but it was many years ago and it's great to have finally done it.

GC> ...except for
GC>   $git grep -i 'boost' configure.ac
GC> which I'd rather ask you to do, and to commit when done,
GC> as I am notably deficient in autoconf-fu.

 I've done it now and pushed to master as 5112db4dc (Don't check for Boost
headers in configure any longer, 2021-10-07).


 One thing that I couldn't do in this commit was to remove the

    LMI_CXX_ADD_IF_SUPPORTED(-Wno-unused-variable)

line from configure. It was initially added as a workaround for warnings in
Boost, but removing it now uncovered that this warning also occurs for "f2"
and "f4" local variables in Ledger::make_evaluator(). These variables are
indeed not used by this function, even though the identical variables are
used in static_formats(). I'd like to do something about this warning here
and not disable it globally, but I'm not sure what would you prefer. The
trivial solution would be to just remove the unused variables, but this
would result in illogically non-consecutive variable names for the
remaining ones, and we probably don't want to rename them to avoid
discrepancies with the names used in static_formats(). The next least
intrusive, but also most ugly, solution, would be to just use pragmas
to disable this warning in this function only. A better one might be to
just make these variables global (if we did this, I'd also strongly
consider making them const, or even constexpr). Would you like me to submit
a patch implementing of those solutions, or perhaps you see an even better
one?


 In any case, thanks again for completing the de-boostification!
VZ

Attachment: pgpvc_2gYB7N4.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]