mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-21 15:32:12 +00:00
removed experimental type_traits:const_reference
element_proxy: add comparison dropped unnecessary overloads svn path=/trunk/boost/boost/numeric/ublas/; revision=24656
This commit is contained in:
@@ -160,6 +160,13 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
}
|
||||
|
||||
// Assignment
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator = (const sparse_storage_element &p) {
|
||||
// Overide the implict copy assignment
|
||||
d_ = p.d_;
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
template<class D>
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator = (const D &d) {
|
||||
@@ -167,12 +174,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator = (const sparse_storage_element &p) {
|
||||
d_ = p.d_;
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
template<class D>
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator += (const D &d) {
|
||||
@@ -180,12 +181,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator += (const sparse_storage_element &p) {
|
||||
d_ += p.d_;
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
template<class D>
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator -= (const D &d) {
|
||||
@@ -193,12 +188,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator -= (const sparse_storage_element &p) {
|
||||
d_ -= p.d_;
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
template<class D>
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator *= (const D &d) {
|
||||
@@ -206,12 +195,6 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator *= (const sparse_storage_element &p) {
|
||||
d_ *= p.d_;
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
template<class D>
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator /= (const D &d) {
|
||||
@@ -219,11 +202,17 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Comparison
|
||||
template<class D>
|
||||
BOOST_UBLAS_INLINE
|
||||
sparse_storage_element &operator /= (const sparse_storage_element &p) {
|
||||
d_ /= p.d_;
|
||||
dirty_ = true;
|
||||
return *this;
|
||||
bool operator == (const D &d) const {
|
||||
return d_ == d;
|
||||
}
|
||||
template<class D>
|
||||
BOOST_UBLAS_INLINE
|
||||
bool operator != (const D &d) const {
|
||||
return d_ != d;
|
||||
}
|
||||
|
||||
// Conversion
|
||||
@@ -269,8 +258,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef I index_type;
|
||||
typedef T data_value_type;
|
||||
// typedef const T &data_const_reference;
|
||||
typedef typename type_traits<T>::const_reference data_const_reference;
|
||||
typedef const T &data_const_reference;
|
||||
#ifndef BOOST_UBLAS_STRICT_STORAGE_SPARSE
|
||||
typedef T &data_reference;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user