From d77a8afbc79c199ea98a986c65a96c529669d4d6 Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Thu, 19 Aug 2004 08:02:47 +0000 Subject: [PATCH] removed experimental type_traits:const_reference For consitency the would be needed for all container typedef It fails with VC6 svn path=/trunk/boost/boost/numeric/ublas/; revision=24588 --- include/boost/numeric/ublas/banded.hpp | 3 +-- include/boost/numeric/ublas/hermitian.hpp | 2 -- include/boost/numeric/ublas/matrix.hpp | 18 ++++++------------ include/boost/numeric/ublas/matrix_sparse.hpp | 15 +++++---------- include/boost/numeric/ublas/storage.hpp | 12 ++++-------- include/boost/numeric/ublas/storage_sparse.hpp | 8 ++++---- include/boost/numeric/ublas/symmetric.hpp | 3 +-- include/boost/numeric/ublas/triangular.hpp | 3 +-- .../boost/numeric/ublas/vector_of_vector.hpp | 3 +-- include/boost/numeric/ublas/vector_sparse.hpp | 12 ++++-------- 10 files changed, 27 insertions(+), 52 deletions(-) diff --git a/include/boost/numeric/ublas/banded.hpp b/include/boost/numeric/ublas/banded.hpp index 936fa872..bfa376b9 100644 --- a/include/boost/numeric/ublas/banded.hpp +++ b/include/boost/numeric/ublas/banded.hpp @@ -36,8 +36,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; diff --git a/include/boost/numeric/ublas/hermitian.hpp b/include/boost/numeric/ublas/hermitian.hpp index e8a63777..2c0d1b53 100644 --- a/include/boost/numeric/ublas/hermitian.hpp +++ b/include/boost/numeric/ublas/hermitian.hpp @@ -51,8 +51,6 @@ namespace boost { namespace numeric { namespace ublas { typedef M matrix_type; typedef typename M::size_type size_type; typedef typename M::value_type value_type; - // typedef const value_type &const_reference; - typedef typename type_traits::const_reference const_reference; typedef value_type &reference; typedef value_type *pointer; diff --git a/include/boost/numeric/ublas/matrix.hpp b/include/boost/numeric/ublas/matrix.hpp index b2590a6c..de2bc696 100644 --- a/include/boost/numeric/ublas/matrix.hpp +++ b/include/boost/numeric/ublas/matrix.hpp @@ -40,8 +40,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -984,8 +983,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -1945,8 +1943,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -2408,8 +2405,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -2857,8 +2853,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -3297,8 +3292,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; diff --git a/include/boost/numeric/ublas/matrix_sparse.hpp b/include/boost/numeric/ublas/matrix_sparse.hpp index 28627989..60a32571 100644 --- a/include/boost/numeric/ublas/matrix_sparse.hpp +++ b/include/boost/numeric/ublas/matrix_sparse.hpp @@ -35,8 +35,7 @@ namespace boost { namespace numeric { namespace ublas { typedef M matrix_type; typedef typename M::size_type size_type; typedef typename M::value_type value_type; - // typedef const value_type &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const value_type &const_reference; typedef value_type &reference; typedef value_type *pointer; @@ -250,8 +249,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; #if ! defined (BOOST_UBLAS_STRICT_STORAGE_SPARSE) && ! defined (BOOST_UBLAS_STRICT_MATRIX_SPARSE) typedef T &reference; #elif defined (BOOST_UBLAS_STRICT_MATRIX_SPARSE) @@ -1323,8 +1321,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; #if ! defined (BOOST_UBLAS_STRICT_STORAGE_SPARSE) && ! defined (BOOST_UBLAS_STRICT_MATRIX_SPARSE) typedef T &reference; #elif defined (BOOST_UBLAS_STRICT_MATRIX_SPARSE) @@ -2508,8 +2505,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE typedef T &reference; #else @@ -3844,8 +3840,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE typedef T &reference; #else diff --git a/include/boost/numeric/ublas/storage.hpp b/include/boost/numeric/ublas/storage.hpp index aa7e47b4..80d568b7 100644 --- a/include/boost/numeric/ublas/storage.hpp +++ b/include/boost/numeric/ublas/storage.hpp @@ -71,8 +71,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -271,8 +270,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -473,8 +471,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; @@ -716,8 +713,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; diff --git a/include/boost/numeric/ublas/storage_sparse.hpp b/include/boost/numeric/ublas/storage_sparse.hpp index 06abd1e6..2aaf7d60 100644 --- a/include/boost/numeric/ublas/storage_sparse.hpp +++ b/include/boost/numeric/ublas/storage_sparse.hpp @@ -602,10 +602,10 @@ namespace boost { namespace numeric { namespace ublas { typedef std::ptrdiff_t difference_type; typedef I index_type; typedef I value_type; - typedef const value_type &const_reference; - typedef value_type &reference; - typedef const value_type *const_pointer; - typedef value_type *pointer; + typedef const I &const_reference; + typedef I &reference; + typedef const I *const_pointer; + typedef I *pointer; // Construction and destruction BOOST_UBLAS_INLINE diff --git a/include/boost/numeric/ublas/symmetric.hpp b/include/boost/numeric/ublas/symmetric.hpp index 10e70c2c..6c2ce1e1 100644 --- a/include/boost/numeric/ublas/symmetric.hpp +++ b/include/boost/numeric/ublas/symmetric.hpp @@ -53,8 +53,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; diff --git a/include/boost/numeric/ublas/triangular.hpp b/include/boost/numeric/ublas/triangular.hpp index db5dc3da..999a1d96 100644 --- a/include/boost/numeric/ublas/triangular.hpp +++ b/include/boost/numeric/ublas/triangular.hpp @@ -36,8 +36,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; typedef T &reference; typedef const T *const_pointer; typedef T *pointer; diff --git a/include/boost/numeric/ublas/vector_of_vector.hpp b/include/boost/numeric/ublas/vector_of_vector.hpp index 71d74ad0..12f6a42c 100644 --- a/include/boost/numeric/ublas/vector_of_vector.hpp +++ b/include/boost/numeric/ublas/vector_of_vector.hpp @@ -36,8 +36,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; #if ! defined (BOOST_UBLAS_STRICT_STORAGE_SPARSE) && ! defined (BOOST_UBLAS_STRICT_VECTOR_SPARSE) typedef T &reference; #elif defined (BOOST_UBLAS_STRICT_VECTOR_SPARSE) diff --git a/include/boost/numeric/ublas/vector_sparse.hpp b/include/boost/numeric/ublas/vector_sparse.hpp index ca222cdc..b7f9a205 100644 --- a/include/boost/numeric/ublas/vector_sparse.hpp +++ b/include/boost/numeric/ublas/vector_sparse.hpp @@ -34,8 +34,7 @@ namespace boost { namespace numeric { namespace ublas { typedef V vector_type; typedef typename V::size_type size_type; typedef typename V::value_type value_type; - // typedef const value_type &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const value_type &const_reference; typedef value_type &reference; typedef value_type *pointer; @@ -246,8 +245,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const value_type &const_reference; #if ! defined (BOOST_UBLAS_STRICT_STORAGE_SPARSE) && ! defined (BOOST_UBLAS_STRICT_VECTOR_SPARSE) typedef T &reference; #elif defined (BOOST_UBLAS_STRICT_VECTOR_SPARSE) @@ -732,8 +730,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_VECTOR_SPARSE typedef T &reference; #else @@ -1296,8 +1293,7 @@ namespace boost { namespace numeric { namespace ublas { typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T value_type; - // typedef const T &const_reference; - typedef typename type_traits::const_reference const_reference; + typedef const T &const_reference; #ifndef BOOST_UBLAS_STRICT_VECTOR_SPARSE typedef T &reference; #else