Make GTSAM_CONCEPT_ASSERTS work with '-Wextra-semi'

release/4.3a0
Ankur Roy Chowdhury 2023-02-14 17:23:25 -08:00 committed by Frank Dellaert
parent ddcfc1b50b
commit 9a50233426
4 changed files with 5 additions and 5 deletions

View File

@ -185,7 +185,7 @@ template<class Class>
struct VectorSpaceTraits: VectorSpaceImpl<Class, Class::dimension> { struct VectorSpaceTraits: VectorSpaceImpl<Class, Class::dimension> {
// Check that Class has the necessary machinery // Check that Class has the necessary machinery
GTSAM_CONCEPT_ASSERT(HasVectorSpacePrereqs<Class>); GTSAM_CONCEPT_ASSERT(HasVectorSpacePrereqs<Class>);
typedef vector_space_tag structure_category; typedef vector_space_tag structure_category;

View File

@ -19,7 +19,7 @@
// This does something sensible: // This does something sensible:
#define BOOST_CONCEPT_USAGE(concept) void check##concept() #define BOOST_CONCEPT_USAGE(concept) void check##concept()
// These just ignore the concept checking for now: // These just ignore the concept checking for now:
#define GTSAM_CONCEPT_ASSERT(concept) #define GTSAM_CONCEPT_ASSERT(concept) void*(concept)
#define GTSAM_CONCEPT_REQUIRES(concept, return_type) return_type #define GTSAM_CONCEPT_REQUIRES(concept, return_type) return_type
#endif #endif

View File

@ -218,7 +218,7 @@ protected:
template <typename T> template <typename T>
class ScalarMultiplyExpression : public Expression<T> { class ScalarMultiplyExpression : public Expression<T> {
// Check that T is a vector space // Check that T is a vector space
GTSAM_CONCEPT_ASSERT(gtsam::IsVectorSpace<T>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<T>);
public: public:
explicit ScalarMultiplyExpression(double s, const Expression<T>& e); explicit ScalarMultiplyExpression(double s, const Expression<T>& e);
@ -231,7 +231,7 @@ class ScalarMultiplyExpression : public Expression<T> {
template <typename T> template <typename T>
class BinarySumExpression : public Expression<T> { class BinarySumExpression : public Expression<T> {
// Check that T is a vector space // Check that T is a vector space
GTSAM_CONCEPT_ASSERT(gtsam::IsVectorSpace<T>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<T>);
public: public:
explicit BinarySumExpression(const Expression<T>& e1, const Expression<T>& e2); explicit BinarySumExpression(const Expression<T>& e1, const Expression<T>& e2);

View File

@ -561,7 +561,7 @@ public:
template <class T> template <class T>
class ScalarMultiplyNode : public ExpressionNode<T> { class ScalarMultiplyNode : public ExpressionNode<T> {
// Check that T is a vector space // Check that T is a vector space
GTSAM_CONCEPT_ASSERT(gtsam::IsVectorSpace<T>); GTSAM_CONCEPT_ASSERT(IsVectorSpace<T>);
double scalar_; double scalar_;
std::shared_ptr<ExpressionNode<T> > expression_; std::shared_ptr<ExpressionNode<T> > expression_;