boostorg / ublas

Boost.uBlas
https://www.boost.org/doc/libs/release/libs/numeric/ublas
111 stars 152 forks source link

g++ 6.1 misleading indentation warning #40

Closed christophermorley closed 5 years ago

christophermorley commented 8 years ago

This looks like a real error. The brace at the end of line 2227 of matrix_expression.hpp looks like it should properly be at line 2224.

/dev/boost/1_57_0/include/boost/numeric/ublas/matrix_expression.hpp: In member function ‘void boost::numeric::ublas::matrix_binary<E1, E2, F>::const_iterator1::increment(boost::numeric::ublas::sparse_bidirectional_iterator_tag)’: /home/cmm/dev/boost/1_57_0/include/boost/numeric/ublas/matrixexpression.hpp:2224:17: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] if (it2 != it2end) ^~

eddelbuettel commented 7 years ago

Seconded. I am still seeing this in 1.65.0.

MartinDuyTat commented 6 years ago

Hello, I recently installed version 1.68.0 and this is still there. Can anyone please confirm if it's a bug or not? Thanks!

austin-beer commented 6 years ago

This would be fixed by PR https://github.com/boostorg/ublas/pull/50. Unfortunately that PR has been open and unmerged for almost a year, so I'm not sure when it will be merged back into develop.

iljah commented 5 years ago

Asked about this at higher level: https://github.com/boostorg/boost/issues/233 or at least hopefully in a place where someone else from boost besides ublas maintainer would see it...

bassoy commented 5 years ago

Thanks for your comments. With version boost version 1.70 or SHA https://github.com/boostorg/ublas/commit/53361d7f42e7d88661c147a2490e10ee32324e48 we corrected the indentation! We are hopefully also going to introduce clang-tidy and clang-format which will help us to further improve this.