Commit bfc8506c authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'vector11-gcc-4-7-fix' into 'master'

g++ 4.7 compile fix in vector11

With g++ 4.7, the following error occurs when trying to compile code that uses Vector11:

../OpenMesh/Core/Geometry/Vector11T.hh: In function ‘decltype ((_v1 % _v2)) OpenMesh::cross(const OpenMesh::VectorT<LScalar, DIM>&, const OpenMesh::VectorT<RScalar, DIM>&) [with LScalar = float; RScalar = float; int DIM = 3; decltype ((_v1 % _v2)) = OpenMesh::VectorT<float, 3>]’:
../OpenMesh/Core/Geometry/Vector11T.hh:89:19: error: ‘OpenMesh::VectorT<float, 3>::container OpenMesh::VectorT<float, 3>::values_’ is private

It looks like this version of g++ would not be able to deal with the decltype statement used when overriding the "%" operator, where the "this->values_" part is not working properly. This issue should be fixed with this merge request.

See merge request !87
parents abed6fe9 6433ed2a
Pipeline #2772 failed with stage
in 22 minutes and 31 seconds
......@@ -366,8 +366,8 @@ class VectorT {
template<typename OtherScalar>
auto operator% (const VectorT<OtherScalar, DIM> &_rhs) const ->
typename std::enable_if<DIM == 3,
VectorT<decltype(this->values_[0] * _rhs[0] -
this->values_[0] * _rhs[0]),
VectorT<decltype((*this)[0] * _rhs[0] -
(*this)[0] * _rhs[0]),
DIM>>::type {
return {
values_[1] * _rhs[2] - values_[2] * _rhs[1],
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment