mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-23 16:12:09 +00:00
quick fix for VC6 mapped_type problem
This commit is contained in:
@@ -240,7 +240,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef A array_type;
|
||||
typedef const T &const_reference;
|
||||
#ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE
|
||||
typedef BOOST_UBLAS_TYPENAME detail::map_traits<A>::reference reference;
|
||||
typedef BOOST_UBLAS_TYPENAME detail::map_traits<A, T>::reference reference;
|
||||
#else
|
||||
typedef sparse_matrix_element<sparse_matrix<T, F, A> > reference;
|
||||
#endif
|
||||
@@ -1295,7 +1295,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef T value_type;
|
||||
typedef const T &const_reference;
|
||||
#ifndef BOOST_UBLAS_STRICT_MATRIX_SPARSE
|
||||
typedef typename detail::map_traits<typename A::data_value_type>::reference reference;
|
||||
typedef typename detail::map_traits<typename A::data_value_type, T>::reference reference;
|
||||
#else
|
||||
typedef sparse_matrix_element<sparse_vector_of_sparse_vector<T, F, A> > reference;
|
||||
#endif
|
||||
|
||||
@@ -562,17 +562,24 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
template<class A>
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
template<class A, class T>
|
||||
struct map_traits {
|
||||
typedef BOOST_UBLAS_TYPENAME A::mapped_type &reference;
|
||||
};
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
template<class I, class T, class ALLOC>
|
||||
struct map_traits<map_array<I, T, ALLOC> > {
|
||||
struct map_traits<map_array<I, T, ALLOC>, T > {
|
||||
typedef typename map_array<I, T, ALLOC>::data_reference reference;
|
||||
};
|
||||
#elif defined (BOOST_UBLAS_STRICT_MAP_ARRAY)
|
||||
#else
|
||||
#if defined (BOOST_UBLAS_STRICT_MAP_ARRAY)
|
||||
#error BOOST_UBLAS_STRICT_MAP_ARRAY require partial template speciazation
|
||||
#endif
|
||||
// ISSUE: T is actually only required for VC6 as it can't find mapped_type
|
||||
template<class A, class T>
|
||||
struct map_traits {
|
||||
typedef T &reference;
|
||||
};
|
||||
#endif
|
||||
|
||||
// reserve helpers for map_array and generic maps
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace boost { namespace numeric { namespace ublas {
|
||||
typedef A array_type;
|
||||
typedef const value_type &const_reference;
|
||||
#ifndef BOOST_UBLAS_STRICT_VECTOR_SPARSE
|
||||
typedef BOOST_UBLAS_TYPENAME detail::map_traits<A>::reference reference;
|
||||
typedef BOOST_UBLAS_TYPENAME detail::map_traits<A,T>::reference reference;
|
||||
#else
|
||||
typedef sparse_vector_element<sparse_vector<T, A> > reference;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user