2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-21 15:32:12 +00:00

workaround gcc.2.95 bug with ? operator and const return value

svn path=/trunk/boost/boost/numeric/ublas/; revision=24803
This commit is contained in:
Michael Stevens
2004-08-29 09:08:20 +00:00
parent 5bf92209f6
commit 1fbfe3263d
2 changed files with 8 additions and 2 deletions

View File

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

View File

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