google-research / agent-based-epidemic-sim

Apache License 2.0
47 stars 17 forks source link

Improve readability of constructor calls of Riegeli classes. #168

Closed copybara-service[bot] closed 3 years ago

copybara-service[bot] commented 3 years ago

Improve readability of constructor calls of Riegeli classes.

Write the type name instead of std::forward_as_tuple for construction of dependencies of these classes. This looks better, at the cost of a tiny performance hit: the dependency is constructed as a temporary and then moved, instead of being constructed in place.

Rely on CTAD (https://en.cppreference.com/w/cpp/language/class_template_argument_deduction) for Riegeli classes to avoid writing the class template argument, in cases the template argument reflects the type of the first constructor argument. Riegeli classes provide deduction guides to make it clear that this is supported.

CTAD requires C++17.

google-cla[bot] commented 3 years ago

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

google-cla[bot] commented 3 years ago

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.