Skip to content

Commit cc4f069

Browse files
committed
MSVC doesn't allow dependent names in template parameters
1 parent 4c227b2 commit cc4f069

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

modules/mrpt_math/include/mrpt/math/TOrientedBox.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class TOrientedBox_
5959
/** The number of planes defined by a box */
6060
constexpr static std::size_t PLANES_PER_BOX = 6;
6161

62+
using plane_array_t = std::array<mrpt::math::TPlane, PLANES_PER_BOX>;
63+
6264
TOrientedBox_() = default;
6365

6466
/** Constructor pose of the center and dimensions in local coordinates */
@@ -115,7 +117,7 @@ class TOrientedBox_
115117
* The ordering of the planes is: [0]=front, [1]=left, [2]=right, [3]=top, [4]=back, [5]=bottom.
116118
* Plane normals are all pointing outwards
117119
*/
118-
[[nodiscard]] std::array<mrpt::math::TPlane, PLANES_PER_BOX> getBoxPlanes() const;
120+
[[nodiscard]] plane_array_t getBoxPlanes() const;
119121

120122
[[nodiscard]] bool operator==(const TOrientedBox_<T>& o) const
121123
{

modules/mrpt_math/src/TOrientedBox.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ TBoundingBox_<T> mrpt::math::TOrientedBox_<T>::getAxisAlignedBox() const
112112
}
113113

114114
template <typename T>
115-
std::array<mrpt::math::TPlane, mrpt::math::TOrientedBox_<T>::PLANES_PER_BOX>
115+
typename mrpt::math::TOrientedBox_<T>::plane_array_t
116116
mrpt::math::TOrientedBox_<T>::getBoxPlanes() const
117117
{
118118
using mrpt::math::TPlane;

0 commit comments

Comments
 (0)