diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index 7c23de7f..10bbe5c3 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -2024,7 +2024,10 @@ namespace boost { namespace numeric { namespace ublas { // Element access BOOST_UBLAS_INLINE const_reference operator () (size_type i, size_type j) const { - return i == j ? one_ : zero_; + if (i == j) + return one_; + else + return zero_; } // Assignment diff --git a/include/boost/numeric/ublas/vector.hpp b/include/boost/numeric/ublas/vector.hpp index 4a31acd7..f48857de 100644 --- a/include/boost/numeric/ublas/vector.hpp +++ b/include/boost/numeric/ublas/vector.hpp @@ -667,7 +667,10 @@ namespace boost { namespace numeric { namespace ublas { // Element access BOOST_UBLAS_INLINE const_reference operator () (size_type i) const { - return i == index_ ? one_ : zero_; + if (i == index_) + return one_; + else + return zero_; } BOOST_UBLAS_INLINE