Fix c++2b errors in add_phoenix.cpp (op[] can take multiple arguments now)

This commit is contained in:
Peter Dimov
2024-01-23 04:57:31 +02:00
parent b07d2dbff4
commit 258aeaa6c1

View File

@@ -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);