Subject: [Boost-bugs] [Boost C++ Libraries] #13381: Compile error with matrix_transformer.apply in Visual C++
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-05 15:05:03
#13381: Compile error with matrix_transformer.apply in Visual C++
------------------------------+----------------------------
Reporter: chw@⦠| Owner: Barend Gehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.66.0 | Severity: Problem
Keywords: |
------------------------------+----------------------------
I just upgraded my code from boost 1.61.0 to 1.66.0 and had to make some
smaller changes due to the switch to boost::qvm for the transformations.
However, every single line containing transform (transforming
point<double, 3, cartesian> to point<double, 3, cartesian> via
matrix_transformer<double, 3, 3>) failed to compile in my case, because
the compiler kept complaining that the template argument for operator 'R'
could not be deduced.
The compiler errors were not particularly helpful, but I figured out that
the following modification helps:
{{{
172c172
< c1 * m_matrix(0,0) + c2 * m_matrix(0,1) + c3 * m_matrix(0,2)
+ m_matrix(0,3)));
---
> c1 * qvm::A<0,0>(m_matrix) + c2 * qvm::A<0,1>(m_matrix) + c3
* qvm::A<0,2>(m_matrix) + qvm::A<0,3>(m_matrix)));
174c174
< c1 * m_matrix(1,0) + c2 * m_matrix(1,1) + c3 * m_matrix(1,2)
+ m_matrix(1,3)));
---
> c1 * qvm::A<1,0>(m_matrix) + c2 * qvm::A<1,1>(m_matrix) + c3
* qvm::A<1,2>(m_matrix) + qvm::A<1,3>(m_matrix)));
176c176
< c1 * m_matrix(2,0) + c2 * m_matrix(2,1) + c3 * m_matrix(2,2)
+ m_matrix(2,3)));
---
> c1 * qvm::A<2,0>(m_matrix) + c2 * qvm::A<2,1>(m_matrix) + c3
* qvm::A<2,2>(m_matrix) + qvm::A<2,3>(m_matrix)));
}}}
Basically I just replaced m_matrix(i,j) by qvm::A<i,j>(m_matrix) in
matrix_transformer::apply.
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13381> 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 : 2018-01-05 15:09:28 UTC