Skip to content

Commit

Permalink
Fix visiblity for linux: move explicit instanciations to the header file
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Oct 31, 2023
1 parent beac11e commit a35ddf5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 11 additions & 0 deletions include/gz/math/MovingWindowFilter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ namespace gz
using MovingWindowFilterVector3f = MovingWindowFilter<Vector3f>;
using MovingWindowFilterVector3d = MovingWindowFilter<Vector3d>;
}


/// The template explicit instanciations that does not use fundamental types
/// (like Vector*) needs to be placed in this header file.
template class GZ_MATH_VISIBLE MovingWindowFilter<int>;
template class GZ_MATH_VISIBLE MovingWindowFilter<float>;
template class GZ_MATH_VISIBLE MovingWindowFilter<double>;
template class GZ_MATH_VISIBLE MovingWindowFilter<gz::math::Vector3i>;
template class GZ_MATH_VISIBLE MovingWindowFilter<gz::math::Vector3f>;
template class GZ_MATH_VISIBLE MovingWindowFilter<gz::math::Vector3d>;

} // namespace math
} // namespace gz
#endif
7 changes: 0 additions & 7 deletions src/MovingWindowFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,6 @@ MovingWindowFilter<gz::math::Vector3d>::Value() const
return value;
}

template class MovingWindowFilter<int>;
template class MovingWindowFilter<float>;
template class MovingWindowFilter<double>;
template class MovingWindowFilter<gz::math::Vector3i>;
template class MovingWindowFilter<gz::math::Vector3f>;
template class MovingWindowFilter<gz::math::Vector3d>;

}
} // namespace math
} // namespace gz

0 comments on commit a35ddf5

Please sign in to comment.