Skip to content

Modernize LoKiCore

Gerhard Raven requested to merge modernize-lokicore into master
  • in constructors (and in functions which invoke them) of functors which have an (assignable) functor i.e. FunctorFromFunctor data member, accept FunctorFromFunctor by value, and move into the data member(s). Compared to perfect forwarding, the overhead is a pointer swap, but the advantage is that the constructor is not templated, and hence can easily be called from python. Compared to passing const Functor&, it may avoid a clone (in case the argument is an rvalue)

  • implement non-recursive toCpp printing of tuple

  • prefer std::less<> over std::less, same for std::greater, std::less_equal, ...

  • and support for variadic no_empty_union, Min,

  • generalize TwoFunctors to N functors

  • Timer_: replace a mutable bool with std::once_flag, and use std::call_once to initialze a bunch of other mutables

  • prefer std::shared_ptr over std::shared_ptr

  • make welcome/goodbye printing thread safe

  • prefer '\n' over std::endl

Edited by Gerhard Raven

Merge request reports

Loading