Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from BOOST_STATIC_ASSERT and EIGEN_ASSERT to static_assert #2951

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
# pragma GCC system_header
#endif

#include <boost/static_assert.hpp>
#include <boost/unordered_map.hpp>
#include <boost/bind/bind.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ namespace pcl
typedef pcl::ihs::Mesh Mesh;
typedef Mesh::HalfEdgeIndices HalfEdgeIndices;

// Currently works only on the manifold mesh.
BOOST_STATIC_ASSERT (Mesh::IsManifold::value);
static_assert (Mesh::IsManifold::value, "MeshProcessing currently works only on the manifold mesh.");

/** \brief Constructor. */
MeshProcessing ();
Expand Down
6 changes: 3 additions & 3 deletions common/include/pcl/common/impl/eigen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,9 @@ pcl::umeyama (const Eigen::MatrixBase<Derived>& src, const Eigen::MatrixBase<Oth
typedef typename Eigen::NumTraits<Scalar>::Real RealScalar;
typedef typename Derived::Index Index;

EIGEN_STATIC_ASSERT (!Eigen::NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL)
EIGEN_STATIC_ASSERT ((Eigen::internal::is_same<Scalar, typename Eigen::internal::traits<OtherDerived>::Scalar>::value),
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
static_assert (!Eigen::NumTraits<Scalar>::IsComplex, "Numeric type must be real.");
static_assert ((Eigen::internal::is_same<Scalar, typename Eigen::internal::traits<OtherDerived>::Scalar>::value),
"You mixed different numeric types. You need to use the cast method of matrixbase to cast numeric types explicitly.");

enum { Dimension = PCL_EIGEN_SIZE_MIN_PREFER_DYNAMIC (Derived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime) };

Expand Down
2 changes: 1 addition & 1 deletion geometry/include/pcl/geometry/mesh_conversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace pcl
typedef typename HalfEdgeMesh::VertexDataCloud VertexDataCloud;
typedef typename HalfEdgeMesh::VertexIndices VertexIndices;

BOOST_STATIC_ASSERT (HalfEdgeMesh::HasVertexData::value); // Output mesh must have data associated with the vertices!
static_assert (HalfEdgeMesh::HasVertexData::value, "Output mesh must have data associated with the vertices!");

VertexDataCloud vertices;
pcl::fromPCLPointCloud2 (face_vertex_mesh.cloud, vertices);
Expand Down