Opened 5 years ago
Closed 5 years ago
#13381 closed Bugs (fixed)
Compile error with matrix_transformer.apply in Visual C++ 2015
Reported by: | Owned by: | Barend Gehrels | |
---|---|---|---|
Milestone: | Boost 1.67.0 | Component: | geometry |
Version: | Boost 1.66.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Change History (2)
comment:1 by , 5 years ago
Summary: | Compile error with matrix_transformer.apply in Visual C++ → Compile error with matrix_transformer.apply in Visual C++ 2015 |
---|
comment:2 by , 5 years ago
Milestone: | To Be Determined → Boost 1.67.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks!
Fix: https://github.com/boostorg/geometry/commit/696e03532fda78a7160dcf777a57c9b03938610a