Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PerThread
andShared
classes inthreaded_loop.h
now longer use references as data members, but instead they use pointers. This fixes some errors when compiling with C++20 as the minimum standard (due to errors in initialising the variables in the constructors) and also allows us to avoid following the rule of 5 (e.g. no need to define custom copy/move constructors and assignment operators).More generally, I think we should try to avoid using references as data members of classes because they limit the implementation of a class and also slightly hurt readability (for example, it's not obvious when accessing the member that it is a reference).