From b30a62eea235eacf50d99f30a5bb78ef2a1c24da Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 26 Aug 2004 14:36:21 +0000 Subject: [PATCH] use bad_index when no reference to const_member svn path=/trunk/boost/boost/numeric/ublas/; revision=24758 --- include/boost/numeric/ublas/banded.hpp | 6 +++--- include/boost/numeric/ublas/triangular.hpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/numeric/ublas/banded.hpp b/include/boost/numeric/ublas/banded.hpp index bfa376b9..96c9c6aa 100644 --- a/include/boost/numeric/ublas/banded.hpp +++ b/include/boost/numeric/ublas/banded.hpp @@ -165,7 +165,7 @@ namespace boost { namespace numeric { namespace ublas { l, lower_ + 1 + upper_)]; #endif #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return zero_; } @@ -1180,7 +1180,7 @@ namespace boost { namespace numeric { namespace ublas { return data () (i, j); #endif #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return zero_; } @@ -1203,7 +1203,7 @@ namespace boost { namespace numeric { namespace ublas { return data () (i, j); #endif #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return zero_; } diff --git a/include/boost/numeric/ublas/triangular.hpp b/include/boost/numeric/ublas/triangular.hpp index 999a1d96..6708eb82 100644 --- a/include/boost/numeric/ublas/triangular.hpp +++ b/include/boost/numeric/ublas/triangular.hpp @@ -130,12 +130,12 @@ namespace boost { namespace numeric { namespace ublas { return data () [functor1_type::element (functor2_type (), i, size1_, j, size2_)]; else if (functor1_type::one (i, j)) { #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return one_; } else { #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return zero_; } @@ -1053,12 +1053,12 @@ namespace boost { namespace numeric { namespace ublas { return data () (i, j); else if (functor_type::one (i, j)) { #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return one_; } else { #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return zero_; } @@ -1072,12 +1072,12 @@ namespace boost { namespace numeric { namespace ublas { return data () (i, j); else if (functor_type::one (i, j)) { #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return one_; } else { #ifndef BOOST_UBLAS_REFERENCE_CONST_MEMBER - external_logic ().raise (); + bad_index ().raise (); #endif return zero_; }