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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user