Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1502 closed Bugs (fixed)

Invalid matrix_indirect / vector_indirect construction with shortcuts

Reported by: Stanislav Funiak <sfuniak@…> Owned by: Gunter
Milestone: Boost 1.36.0 Component: uBLAS
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

I'm using the indirect array proxies with BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS defined. The template parameters of matrix_indirect / vector_indirect in matrix_expression / vector_expression are invalid.

See lines 372-381 in expression_types.hpp (in SVN revision 39369). Changing matrix_indirect<E, A > to matrix_indirect<E,indirect_array<A> > seems to solve the problem.

#define BOOST_UBLAS_ENABLE_PROXY_SHORTCUTS

#include <vector>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix_proxy.hpp>
#include <boost/numeric/ublas/vector_proxy.hpp>

int main()
{
  using namespace boost::numeric::ublas;
  indirect_array<std::vector<std::size_t> > ia;
  matrix<double> m;
  vector<double> v;
  m(ia,ia); // compilation error
  v(ia);    // compilation error
}

Attachments (1)

indirect.cpp (453 bytes) - added by Stanislav Funiak <sfuniak@…> 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by Stanislav Funiak <sfuniak@…>

Attachment: indirect.cpp added

comment:1 Changed 11 years ago by Gunter

Resolution: fixed
Status: newclosed

(In [41801]) - fix and close #1502

  • the return types were not correct: there was A instead of indirect_array<A>

comment:2 Changed 11 years ago by Eric Niebler

(In [41915]) Merged revisions 41776-41815 via svnmerge from https://svn.boost.org/svn/boost/trunk

........

r41778 | bgubenko | 2007-12-06 02:47:52 -0800 (Thu, 06 Dec 2007) | 1 line

compute 'result' in to_ulong() as it is done in Boost 1.34

........

r41788 | vladimir_prus | 2007-12-06 08:00:38 -0800 (Thu, 06 Dec 2007) | 2 lines

Add Google Analytics tracking code for the uploaded docs.

........

r41789 | vladimir_prus | 2007-12-06 08:12:01 -0800 (Thu, 06 Dec 2007) | 3 lines

Fix search for html files. Put packages where beta.boost.org can fetch them.

........

r41791 | vladimir_prus | 2007-12-06 08:23:39 -0800 (Thu, 06 Dec 2007) | 1 line

Fix quoting

........

r41795 | dgregor | 2007-12-06 09:17:38 -0800 (Thu, 06 Dec 2007) | 4 lines

Bump VC++ version check to continue applying VC-specific workaround for Visual C++ 9.0. Fixes #1499

........

r41798 | dgregor | 2007-12-06 10:39:06 -0800 (Thu, 06 Dec 2007) | 3 lines

Disable more Visual C++ warnings in Function headers. Fixes #1416

........

r41801 | guwi17 | 2007-12-06 11:21:31 -0800 (Thu, 06 Dec 2007) | 3 lines

  • fix and close #1502
  • the return types were not correct: there was A instead of indirect_array<A>

........

r41802 | dgregor | 2007-12-06 11:22:06 -0800 (Thu, 06 Dec 2007) | 4 lines

Workaround for MPICH to properly deal with SEEK_* constants. Fixes #1486

........

r41805 | t_schwinger | 2007-12-06 13:25:10 -0800 (Thu, 06 Dec 2007) | 3 lines

annotates on msvc 7.1 overload selection bug in function_types example

........

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Gunter.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.