Boost in LyX

Yuriy Skalko yuriy.skalko at gmail.com
Fri Nov 20 14:33:50 UTC 2020


> I have to say that lambdas are not my cup of tea, but the original code is not great either.

I've seen usage of lambdas in LyX code, so thought they are acceptable 
for such small functions.


> Considering the following:
> 
>         transform(lyxaction.func_begin(), lyxaction.func_end(),
> -               back_inserter(commands_), firster());
> +                         back_inserter(commands_),
> +                         [](auto const & p) { return p.first; });
> 
> code with boost adaptors would loo like
> 
> for (string const & cmd : lyxaction | boost::adaptors::map_keys)
>         commands_.back_insert(cmd);
> 
> JMarc


I assume that it is a template-heavy thing and it can significantly 
increase compilation time (also don't know about compatibility of boost 
ranges with ranges-v3 library that will be standard from C++20). Is it 
OK to use it? And more general question: what parts of Boost are OK for 
usage in LyX?

Yuriy


More information about the lyx-devel mailing list