boostorg / graph

Boost.org graph module
http://boost.org/libs/graph
326 stars 208 forks source link

C++23-fix-add-parentheses #314

Closed poelmanc closed 2 years ago

poelmanc commented 2 years ago

e.g. [a,b] -> [(a,b)] to avoid confusion with C++23 array subscript operator[] Without these changes, code produces compilation error with the clangcl 15 delivered by MSVC 2022 15.5 Preview with /std:c++latest mode.

poelmanc commented 2 years ago

Footnote: This issue was fixed over in boost/wave already and that author phrased the issue more succinctly:

https://github.com/boostorg/wave/pull/148/commits/ef2d7d830bc7141b7272faf59bd8163db8297f92

The comma operator is deprecated inside of square brackets The fix is simple: add a layer of parentheses

jeremy-murphy commented 2 years ago

Thanks! Once the CI is green, I'll merge it.

jeremy-murphy commented 2 years ago

Thanks, @poelmanc !