Listing 4.22 - does not compile#31
Open
ITHelpDec wants to merge 6 commits intoanthonywilliams:mainfrom
Open
Conversation
v.push_back(f.get()); - - - 'this' argument to member function 'get' has type 'const std::future<int>', but function is not marked const
consider just using `it`, as `begin + this_chunk_size` isn't technically the beginning anymore
it seems expensive to repeatedly initialise std::size_t variables inside of the loop when they could be initialised once, then modified as and when
we do not amend `vec` during the function - we therefore run the risk of losing out on potential compiler optimisations by ignoring this constness
current function pointer structure will not translate well into using template functions
ITHelpDec
added a commit
to ITHelpDec/ccia_code_samples
that referenced
this pull request
Apr 27, 2023
same change as from anthonywilliams#31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Code tweaked to allow compilation.
Subjective amendments included in an attempt to make code more robust and declarative.
Please consider writing fuller-bodied code samples to provide more context to the reader, as well as ensure the code compiles and runs as intended.
Please also consider (if reasonable) more liberal use of whitespace to improve legibility at first read.
I have provided an example of my understanding of the code sample below - please feel free to amend as appropriate.
Listing 4.22 (click to expand / collapse)
Thank you for your contributions.