[Boost-bugs] [Boost C++ Libraries] #1915: Nested matrix products with transposes causes compiler to complain error: invalid application of ‘sizeof’

Subject: [Boost-bugs] [Boost C++ Libraries] #1915: Nested matrix products with transposes causes compiler to complain error: invalid application of ‘sizeof’
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-05-14 05:52:06


#1915: Nested matrix products with transposes causes compiler to complain error:
invalid application of ‘sizeof’
------------------------------------------+---------------------------------
 Reporter: Leo Singer <aronnax_at_[hidden]> | Owner: guwi17
     Type: Bugs | Status: new
Milestone: Boost 1.36.0 | Component: uBLAS
  Version: Boost 1.34.1 | Severity: Problem
 Keywords: ublas trans |
------------------------------------------+---------------------------------
 When using ublas, a pair of nested products will cause the compiler to
 complain if there is a `trans` on any of the operands. For example:

 {{{
 #!cpp
 using namespace boost::numeric::ublas;
 matrix<float> A(3,3), B(3,3), C(3,3);

 prod(prod(A,B),trans(C)); // fails
 prod(prod(trans(A),B),C); // fails
 prod(prod(A,trans(B)),C); // fails
 prod(prod(A,B),C); // OK
 }}}

 The compiler produces the following error message:
 {{{
 /opt/local/include/boost/numeric/ublas/matrix_expression.hpp: In function
 â€˜typename boost::numeric::ublas::matrix_matrix_binary_traits<typename
 E1::value_type, E1, typename E2::value_type, E2>::result_type
 boost::numeric::ublas::prod(const
 boost::numeric::ublas::matrix_expression<E>&, const
 boost::numeric::ublas::matrix_expression<E2>&) [with E1 =
 boost::numeric::ublas::matrix_matrix_binary<boost::numeric::ublas::matrix<float,
 boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
 boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
 boost::numeric::ublas::matrix<float,
 boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
 boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
 boost::numeric::ublas::matrix_matrix_prod<float, float, float> >, E2 =
 boost::numeric::ublas::matrix_unary2<boost::numeric::ublas::matrix<float,
 boost::numeric::ublas::basic_row_major<size_t, ptrdiff_t>,
 boost::numeric::ublas::unbounded_array<float, std::allocator<float> > >,
 boost::numeric::ublas::scalar_identity<float> >]’:
 bad_multiply.cpp:9: instantiated from here
 /opt/local/include/boost/numeric/ublas/matrix_expression.hpp:4815: error:
 invalid application of ‘sizeof’ to incomplete type
 â€˜boost::STATIC_ASSERTION_FAILURE<false>’
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1915>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC