We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello! Every next call do a copy, how to pass a ref value?
Example:
struct test_t { std::string v1; int v2; }; constexpr std::size_t benchmarkVectorSize{ 1000000 }; std::vector<test_t> vecCpp(benchmarkVectorSize); srand(0xDEADBEEF); for (unsigned i = 0; i < benchmarkVectorSize; i++) { const auto x = rand(); vecCpp[i].v2 = x; vecCpp[i].v1 = std::to_string(x); } boolinq::from(vecCpp).for_each([](test_t a) { a.v1; int iii = 02; });
every for_each make object copy about 2 times how to aviod this, and how can i change value in for_each ops;
I want this work well:
boolinq::from(vecCpp).for_each([](test_t &a) { a.v1 = "123" });
The text was updated successfully, but these errors were encountered:
@vanehu what about this?
for (auto & it : boolinq::from(vecCpp)) { it.v1 = "123"; }
Sorry, something went wrong.
I do not see any way to have non-const refs to items. This issue is related to this one: #22
No branches or pull requests
Hello! Every next call do a copy, how to pass a ref value?
Example:
every for_each make object copy about 2 times
how to aviod this, and how can i change value in for_each ops;
I want this work well:
The text was updated successfully, but these errors were encountered: