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

Simplify with C++17 #46

Open
ryanofsky opened this issue Mar 15, 2021 · 0 comments
Open

Simplify with C++17 #46

ryanofsky opened this issue Mar 15, 2021 · 0 comments

Comments

@ryanofsky
Copy link
Collaborator

Saving note from an email, there are a ton of a simplifications that can be made now that C++17 is required:

A lot of code needs better comments, and there are also big swathes that are overcomplicated because they were written to use c++11, and can now be simplified with c++17. Examples:

  • AUTO_RETURN macro uses can be replaced with auto return types
  • Priority<0>, Prioriity<1>, Priority<2> overloads used for conditional compilation can all go away and be replaced with if constexpr
  • std::tuple indexing code can go away and be replaced with std::apply

Basically all of mp/util.h can go away. Also kj::mvCapture uses can replaced with shorter direct captures.

ryanofsky added a commit that referenced this issue Dec 31, 2021
…ides

cf7ebfe Replace ThreadMap Passfield override with generic count(0) override (Russell Yanofsky)
3f388cf Inline last AUTO_RETURN uses and remove macro (Russell Yanofsky)
41db49c Consolidate PassField function to remove AUTO_RETURN uses (Russell Yanofsky)
1d00505 Replace output.init AUTO_RETURN uses with decltype(auto) (Russell Yanofsky)
ea1a77b Replace AUTO_RETURN uses with decltype(auto) (Russell Yanofsky)

Pull request description:

  This is part of #46. `AUTORET` macro is no longer needed with C++14 `decltype(auto)`

Top commit has no ACKs.

Tree-SHA512: dbd2e60787c2f9c78251d1dc47601be3c52ced1e2a84391de6e3d08a920907542b6c906ca30d0f70ba8c3226952a67c39ab8ddca58f55d920a963335a9ad2e5a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant