$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r69434 - sandbox/numeric_bindings/boost/numeric/bindings/ublas
From: rutger_at_[hidden]
Date: 2011-03-01 03:22:47
Author: rutger
Date: 2011-03-01 03:22:45 EST (Tue, 01 Mar 2011)
New Revision: 69434
URL: http://svn.boost.org/trac/boost/changeset/69434
Log:
Applied path to ublas/storage from Andrey Asadchev
Text files modified: 
   sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp |    34 +++++-----------------------------      
   1 files changed, 5 insertions(+), 29 deletions(-)
Modified: sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp
==============================================================================
--- sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp	(original)
+++ sandbox/numeric_bindings/boost/numeric/bindings/ublas/storage.hpp	2011-03-01 03:22:45 EST (Tue, 01 Mar 2011)
@@ -1,5 +1,6 @@
 //
 // Copyright (c) 2009 Rutger ter Borg
+// Copyright (c) 2011 Andrey Asadchev
 //
 // Distributed under the Boost Software License, Version 1.0.
 // (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,42 +12,17 @@
 
 #include <boost/numeric/bindings/detail/adaptor.hpp>
 #include <boost/numeric/ublas/storage.hpp>
+#include <boost/type_traits/is_base_of.hpp>
 
 namespace boost {
 namespace numeric {
 namespace bindings {
 namespace detail {
 
-template< typename T, std::size_t N, typename Alloc, typename Id, typename Enable >
-struct adaptor< ::boost::numeric::ublas::bounded_array< T, N, Alloc >, Id, Enable > {
+template< typename T, typename Id >
+struct adaptor< T, Id, typename boost::enable_if< boost::is_base_of< ublas::storage_array<T>, T> >::type > {
 
-    typedef typename copy_const< Id, T >::type value_type;
-    typedef mpl::map<
-        mpl::pair< tag::value_type, value_type >,
-        mpl::pair< tag::entity, tag::vector >,
-        mpl::pair< tag::size_type<1>, std::ptrdiff_t >,
-        mpl::pair< tag::data_structure, tag::linear_array >,
-        mpl::pair< tag::stride_type<1>, tag::contiguous >
-    > property_map;
-
-    static std::ptrdiff_t size1( const Id& id ) {
-        return id.size();
-    }
-
-    static value_type* begin_value( Id& id ) {
-        return id.begin();
-    }
-
-    static value_type* end_value( Id& id ) {
-        return id.end();
-    }
-
-};
-
-template< typename T, typename Alloc, typename Id, typename Enable >
-struct adaptor< ublas::unbounded_array< T, Alloc >, Id, Enable > {
-
-    typedef typename copy_const< Id, T >::type value_type;
+    typedef typename copy_const< Id, typename T::value_type >::type value_type;
     typedef mpl::map<
         mpl::pair< tag::value_type, value_type >,
         mpl::pair< tag::entity, tag::vector >,