2
0
mirror of https://github.com/boostorg/ublas.git synced 2026-02-26 05:02:16 +00:00

Remove member friend swap

unrequired for concept and cause compiler wierdness

svn path=/trunk/boost/boost/numeric/ublas/; revision=25360
This commit is contained in:
Michael Stevens
2004-09-23 07:19:57 +00:00
parent a262712a73
commit bf2e550c9c
2 changed files with 4 additions and 16 deletions

View File

@@ -330,17 +330,11 @@ namespace boost { namespace numeric { namespace ublas {
// Swapping
BOOST_UBLAS_INLINE
void swap (matrix_reference &v) {
if (this != &v) {
expression ().swap (v.expression ());
void swap (matrix_reference &m) {
if (!same_closure (*this, m)) {
expression ().swap (m.expression ());
}
}
#ifndef BOOST_UBLAS_NO_MEMBER_FRIENDS
BOOST_UBLAS_INLINE
friend void swap (matrix_reference &m1, matrix_reference &m2) {
m1.swap (m2);
}
#endif
// Closure comparison
BOOST_UBLAS_INLINE

View File

@@ -345,16 +345,10 @@ namespace boost { namespace numeric { namespace ublas {
// Swapping
BOOST_UBLAS_INLINE
void swap (vector_reference &v) {
if (this != &v) {
if (!same_closure (*this, v)) {
expression ().swap (v.expression ());
}
}
#ifndef BOOST_UBLAS_NO_MEMBER_FRIENDS
BOOST_UBLAS_INLINE
friend void swap (vector_reference &v1, vector_reference &v2) {
v1.swap (v2);
}
#endif
// Closure comparison
BOOST_UBLAS_INLINE