diff --git a/gtsam/linear/GaussianFactorGraph.h b/gtsam/linear/GaussianFactorGraph.h index 8f989c1d0..5b6ef4371 100644 --- a/gtsam/linear/GaussianFactorGraph.h +++ b/gtsam/linear/GaussianFactorGraph.h @@ -31,7 +31,7 @@ namespace gtsam { - class SharedDiagonal; + struct SharedDiagonal; /** unnormalized error */ template diff --git a/gtsam/linear/HessianFactor.h b/gtsam/linear/HessianFactor.h index 4c4e2e034..ec9fc2910 100644 --- a/gtsam/linear/HessianFactor.h +++ b/gtsam/linear/HessianFactor.h @@ -32,7 +32,7 @@ namespace gtsam { // Forward declarations class JacobianFactor; - class SharedDiagonal; + struct SharedDiagonal; class GaussianConditional; template class BayesNet; diff --git a/gtsam/linear/NoiseModel.h b/gtsam/linear/NoiseModel.h index 73368e299..3a6d62a56 100644 --- a/gtsam/linear/NoiseModel.h +++ b/gtsam/linear/NoiseModel.h @@ -25,7 +25,7 @@ namespace gtsam { - class SharedDiagonal; // forward declare + struct SharedDiagonal; // forward declare namespace noiseModel { @@ -97,7 +97,7 @@ namespace gtsam { * |y|^2 = y'*y = x'*R'*R*x * Various derived classes are available that are more efficient. */ - struct Gaussian: public Base { + class Gaussian: public Base { protected: diff --git a/gtsam/linear/VectorValues.h b/gtsam/linear/VectorValues.h index 6a391d607..5ac6600f9 100644 --- a/gtsam/linear/VectorValues.h +++ b/gtsam/linear/VectorValues.h @@ -240,7 +240,7 @@ inline Vector VectorValues::range(const ITERATOR& idx_begin, const ITERATOR& idx for (ITERATOR it=idx_begin; it!=idx_end; ++it) { ConstSubVector v = (*this)[*it]; const size_t d = v.size(); - result.segment(start, d) = v; + result.segment(start, d).operator=(v); // This syntax works around what seems to be a bug in clang++ start += d; } return result; diff --git a/gtsam/nonlinear/Key.h b/gtsam/nonlinear/Key.h index d7f501c93..fce8d9439 100644 --- a/gtsam/nonlinear/Key.h +++ b/gtsam/nonlinear/Key.h @@ -69,7 +69,7 @@ public: return C; } const char* c_str() const { - return (std::string) (*this).c_str(); + return ((std::string) (*this)).c_str(); } operator std::string() const { return (boost::format("%c%d") % C % j_).str(); @@ -290,7 +290,7 @@ public: return label_; } const char* c_str() const { - return (std::string) (*this).c_str(); + return ((std::string)(*this)).c_str(); } operator std::string() const { std::string label_s = (boost::format("%1%") % label_).str(); diff --git a/gtsam/nonlinear/NonlinearEquality.h b/gtsam/nonlinear/NonlinearEquality.h index 2fa05e2a4..62f278704 100644 --- a/gtsam/nonlinear/NonlinearEquality.h +++ b/gtsam/nonlinear/NonlinearEquality.h @@ -74,19 +74,19 @@ namespace gtsam { /** * Constructor - forces exact evaluation */ - NonlinearEquality(const KEY& j, const T& feasible, bool (*compare)(const T&, const T&) = compare) : + NonlinearEquality(const KEY& j, const T& feasible, bool (*_compare)(const T&, const T&) = compare) : Base(noiseModel::Constrained::All(feasible.dim()), j), feasible_(feasible), allow_error_(false), error_gain_(0.0), - compare_(compare) { + compare_(_compare) { } /** * Constructor - allows inexact evaluation */ - NonlinearEquality(const KEY& j, const T& feasible, double error_gain, bool (*compare)(const T&, const T&) = compare) : + NonlinearEquality(const KEY& j, const T& feasible, double error_gain, bool (*_compare)(const T&, const T&) = compare) : Base(noiseModel::Constrained::All(feasible.dim()), j), feasible_(feasible), allow_error_(true), error_gain_(error_gain), - compare_(compare) { + compare_(_compare) { } void print(const std::string& s = "") const { diff --git a/gtsam/nonlinear/TupleValues.h b/gtsam/nonlinear/TupleValues.h index 92f0da07b..e49cc6a90 100644 --- a/gtsam/nonlinear/TupleValues.h +++ b/gtsam/nonlinear/TupleValues.h @@ -56,8 +56,8 @@ namespace gtsam { public: // typedefs for values subtypes - typedef class VALUES1::Key Key1; - typedef class VALUES1::Value Value1; + typedef typename VALUES1::Key Key1; + typedef typename VALUES1::Value Value1; /** default constructor */ TupleValues() {} @@ -262,8 +262,8 @@ namespace gtsam { public: // typedefs - typedef class VALUES::Key Key1; - typedef class VALUES::Value Value1; + typedef typename VALUES::Key Key1; + typedef typename VALUES::Value Value1; TupleValuesEnd() {}