mirror of
https://github.com/boostorg/local_function.git
synced 2026-01-19 04:22:08 +00:00
Fix c++2b errors in add_phoenix.cpp (op[] can take multiple arguments now)
This commit is contained in:
@@ -24,7 +24,7 @@ int main(void) {
|
||||
// Passed to template, `factor` by constant, and defined in expression.
|
||||
std::for_each(nums, nums + 3, let(_f = cref(factor))[
|
||||
// Unfortunately, body cannot use C++ statement syntax.
|
||||
ref(sum) += _f * _1, _1 // Access `sum` by reference.
|
||||
( ref(sum) += _f * _1, _1 ) // Access `sum` by reference.
|
||||
]);
|
||||
|
||||
BOOST_TEST(sum == 60);
|
||||
|
||||
Reference in New Issue
Block a user