Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor/149-update-to-c++-20 #149

Open
jharwell opened this issue Apr 27, 2021 · 0 comments
Open

refactor/149-update-to-c++-20 #149

jharwell opened this issue Apr 27, 2021 · 0 comments

Comments

@jharwell
Copy link
Owner

jharwell commented Apr 27, 2021

Here are things I know I should change:

  • Add usage of designated initializers for structures--way easier and clearer to
    initialize them that way than having to define regular constructors.

  • inline static const std::string -> static constexpr const std::string

  • Switch from boost::mpl to boost::hana, because it supersedes it, and gives
    much more intelligible error messages.

  • Add more move references (&&) to functions which consume their arguments to
    make intent clearer.

  • Remove NS_START(),NS_END() macros so that my code parses cleaner with doxygen.

  • Refactor HAL so that all the units returned in sensors/actuators are in SI
    units, regardless of whatever nonsense ARGoS does.

  • Benchmark -Os vs -O2 for large swarms to see what I should go with, or make it
    a cmake switch.

  • Switch to mixing aggregate (with dots) initialization and regular constructors
    for structs, which is supported in C++20. E.g., foraging_strategy::params.

  • Maybe switch to using the format strings in the C++ library for logging,
    rather than printf().

  • Switch to using referenced parameters where needed in XML, so that I don't
    duplicate configuration (e.g., arena grid for both loop functions AND robots).

  • Switch all uses of the decorator pattern to private inheritance where
    appropriate--way better encapsulation.

  • Look into iwyu again, and the clang flag for timing builds to see where I
    could improve.

  • Switch from func(void) to func(), per modern C++ (I think).

  • Introduce concepts into RCPPSW to formalize some of the decls that need to be
    present in templated types for stuff to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant