Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ambiguous ref calls (ticket 1974) #54

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions include/boost/numeric/ublas/vector_of_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ namespace boost { namespace numeric { namespace ublas {
data ().resize (sizeM + 1, preserve);
if (preserve) {
for (size_type i = 0; (i <= oldM) && (i < sizeM); ++ i)
ref (data () [i]).resize (sizem, preserve);
boost::numeric::ublas::ref (data () [i]).resize (sizem, preserve);
for (size_type i = oldM+1; i < sizeM; ++ i) // create new vector elements
data_.insert_element (i, vector_data_value_type ()) .resize (sizem, false);
if (sizeM > oldM) {
data_.insert_element (sizeM, vector_data_value_type ());
} else {
ref (data () [sizeM]).resize (0, false);
boost::numeric::ublas::ref (data () [sizeM]).resize (0, false);
}
} else {
for (size_type i = 0; i < sizeM; ++ i)
Expand Down Expand Up @@ -298,15 +298,15 @@ namespace boost { namespace numeric { namespace ublas {
true_reference insert_element (size_type i, size_type j, const_reference t) {
const size_type elementM = layout_type::index_M (i, j);
const size_type elementm = layout_type::index_m (i, j);
vector_data_value_type& vd (ref (data () [elementM]));
vector_data_value_type& vd (boost::numeric::ublas::ref (data () [elementM]));
storage_invariants ();
return vd.insert_element (elementm, t);
}
BOOST_UBLAS_INLINE
void append_element (size_type i, size_type j, const_reference t) {
const size_type elementM = layout_type::index_M (i, j);
const size_type elementm = layout_type::index_m (i, j);
vector_data_value_type& vd (ref (data () [elementM]));
vector_data_value_type& vd (boost::numeric::ublas::ref (data () [elementM]));
storage_invariants ();
return vd.append_element (elementm, t);
}
Expand All @@ -323,7 +323,7 @@ namespace boost { namespace numeric { namespace ublas {
const size_type sizeM = layout_type::size_M (size1_, size2_);
// FIXME should clear data () if this is done via value_type/*zero*/() then it is not size preserving
for (size_type i = 0; i < sizeM; ++ i)
ref (data () [i]).clear ();
boost::numeric::ublas::ref (data () [i]).clear ();
storage_invariants ();
}

Expand All @@ -337,7 +337,7 @@ namespace boost { namespace numeric { namespace ublas {

BOOST_UBLAS_INLINE
true_reference at_element (size_type i, size_type j) {
return ref (ref (data () [layout_type::index_M (i, j)]) [layout_type::index_m (i, j)]);
return boost::numeric::ublas::ref (boost::numeric::ublas::ref (data () [layout_type::index_M (i, j)]) [layout_type::index_m (i, j)]);
}

public:
Expand Down