From 2788ec7f33954dc46da24ea7d5bf25ad919df125 Mon Sep 17 00:00:00 2001 From: gawela Date: Wed, 29 Oct 2014 10:23:13 +0100 Subject: [PATCH] removed std::type_traits which is c++11 --- gtsam/base/LieMatrix.h | 2 +- gtsam/base/LieScalar.h | 6 +++--- gtsam/base/LieVector.h | 2 +- gtsam/base/Manifold.h | 26 +++++++++++++------------- gtsam/geometry/Cal3Bundler.h | 4 ++-- gtsam/geometry/Cal3DS2.h | 4 ++-- gtsam/geometry/Cal3Unified.h | 4 ++-- gtsam/geometry/Cal3_S2.h | 4 ++-- gtsam/geometry/CalibratedCamera.h | 6 +++--- gtsam/geometry/EssentialMatrix.h | 4 ++-- gtsam/geometry/PinholeCamera.h | 4 ++-- gtsam/geometry/Point2.h | 6 +++--- gtsam/geometry/Point3.h | 6 +++--- gtsam/geometry/Pose2.h | 4 ++-- gtsam/geometry/Pose3.h | 6 +++--- gtsam/geometry/Rot2.h | 6 +++--- gtsam/geometry/Rot3.h | 6 +++--- gtsam/geometry/StereoCamera.h | 4 ++-- gtsam/geometry/StereoPoint2.h | 6 +++--- gtsam/geometry/Unit3.h | 4 ++-- gtsam/navigation/ImuBias.h | 6 +++--- gtsam/nonlinear/Values.h | 2 +- gtsam/nonlinear/tests/testValues.cpp | 4 ++-- gtsam_unstable/dynamics/PoseRTV.h | 4 ++-- gtsam_unstable/geometry/Pose3Upright.h | 4 ++-- 25 files changed, 67 insertions(+), 67 deletions(-) diff --git a/gtsam/base/LieMatrix.h b/gtsam/base/LieMatrix.h index cd8489bbc..1aca49d55 100644 --- a/gtsam/base/LieMatrix.h +++ b/gtsam/base/LieMatrix.h @@ -178,7 +178,7 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> diff --git a/gtsam/base/LieScalar.h b/gtsam/base/LieScalar.h index b91d3ca2f..1d4aa86e2 100644 --- a/gtsam/base/LieScalar.h +++ b/gtsam/base/LieScalar.h @@ -116,15 +116,15 @@ namespace gtsam { namespace traits { template<> - struct is_group : public std::true_type { + struct is_group : public boost::true_type { }; template<> - struct is_manifold : public std::true_type { + struct is_manifold : public boost::true_type { }; template<> - struct dimension : public std::integral_constant { + struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/base/LieVector.h b/gtsam/base/LieVector.h index 808a47c2c..9f84af73d 100644 --- a/gtsam/base/LieVector.h +++ b/gtsam/base/LieVector.h @@ -133,7 +133,7 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> diff --git a/gtsam/base/Manifold.h b/gtsam/base/Manifold.h index 8f897c36d..4fe6c9d99 100644 --- a/gtsam/base/Manifold.h +++ b/gtsam/base/Manifold.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include namespace gtsam { @@ -50,7 +50,7 @@ namespace traits { // is group, by default this is false template -struct is_group: public std::false_type { +struct is_group: public boost::false_type { }; // identity, no default provided, by default given by default constructor @@ -63,11 +63,11 @@ struct identity { // is manifold, by default this is false template -struct is_manifold: public std::false_type { +struct is_manifold: public boost::false_type { }; // dimension, can return Eigen::Dynamic (-1) if not known at compile time -typedef std::integral_constant Dynamic; +typedef boost::integral_constant Dynamic; template struct dimension : public Dynamic {}; //default to dynamic @@ -83,15 +83,15 @@ template struct zero: public identity { // double template<> -struct is_group : public std::true_type { +struct is_group : public boost::true_type { }; template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> @@ -104,11 +104,11 @@ struct zero { // Fixed size Eigen::Matrix type template -struct is_group > : public std::true_type { +struct is_group > : public boost::true_type { }; template -struct is_manifold > : public std::true_type { +struct is_manifold > : public boost::true_type { }; // TODO: Could be more sophisticated using Eigen traits and SFINAE? @@ -126,12 +126,12 @@ struct dimension > : public Dy }; template -struct dimension > : public std::integral_constant< +struct dimension > : public boost::integral_constant< int, M * N> { }; template -struct zero > : public std::integral_constant< +struct zero > : public boost::integral_constant< int, M * N> { BOOST_STATIC_ASSERT_MSG((M!=Eigen::Dynamic && N!=Eigen::Dynamic), "traits::zero is only supported for fixed-size matrices"); @@ -140,7 +140,7 @@ struct zero > : public std::integral_consta } }; -template struct is_chart : public std::false_type {}; +template struct is_chart : public boost::false_type {}; } // \ namespace traits @@ -164,7 +164,7 @@ struct DefaultChart { namespace traits { // populate default traits -template struct is_chart > : public std::true_type {}; +template struct is_chart > : public boost::true_type {}; template struct dimension > : public dimension {}; } diff --git a/gtsam/geometry/Cal3Bundler.h b/gtsam/geometry/Cal3Bundler.h index 375749e69..81c7f6851 100644 --- a/gtsam/geometry/Cal3Bundler.h +++ b/gtsam/geometry/Cal3Bundler.h @@ -189,11 +189,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> diff --git a/gtsam/geometry/Cal3DS2.h b/gtsam/geometry/Cal3DS2.h index 0ef34005d..47dc934b2 100644 --- a/gtsam/geometry/Cal3DS2.h +++ b/gtsam/geometry/Cal3DS2.h @@ -171,11 +171,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/Cal3Unified.h b/gtsam/geometry/Cal3Unified.h index ad8e7b904..7986161e1 100644 --- a/gtsam/geometry/Cal3Unified.h +++ b/gtsam/geometry/Cal3Unified.h @@ -142,11 +142,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> diff --git a/gtsam/geometry/Cal3_S2.h b/gtsam/geometry/Cal3_S2.h index 2f3a61bce..cb93850c7 100644 --- a/gtsam/geometry/Cal3_S2.h +++ b/gtsam/geometry/Cal3_S2.h @@ -243,11 +243,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> diff --git a/gtsam/geometry/CalibratedCamera.h b/gtsam/geometry/CalibratedCamera.h index 5d4c6420e..4a8efae7b 100644 --- a/gtsam/geometry/CalibratedCamera.h +++ b/gtsam/geometry/CalibratedCamera.h @@ -226,15 +226,15 @@ private: namespace traits { template<> -struct is_group : public std::true_type { +struct is_group : public boost::true_type { }; template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/EssentialMatrix.h b/gtsam/geometry/EssentialMatrix.h index 48a0fead6..5ac83a97a 100644 --- a/gtsam/geometry/EssentialMatrix.h +++ b/gtsam/geometry/EssentialMatrix.h @@ -199,11 +199,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> diff --git a/gtsam/geometry/PinholeCamera.h b/gtsam/geometry/PinholeCamera.h index aa42b638f..83851e8c0 100644 --- a/gtsam/geometry/PinholeCamera.h +++ b/gtsam/geometry/PinholeCamera.h @@ -663,11 +663,11 @@ private: namespace traits { template -struct is_manifold > : public std::true_type { +struct is_manifold > : public boost::true_type { }; template -struct dimension > : public std::integral_constant< +struct dimension > : public boost::integral_constant< int, dimension::value + dimension::value> { }; diff --git a/gtsam/geometry/Point2.h b/gtsam/geometry/Point2.h index 56570723d..825d45307 100644 --- a/gtsam/geometry/Point2.h +++ b/gtsam/geometry/Point2.h @@ -253,15 +253,15 @@ inline Point2 operator*(double s, const Point2& p) {return p*s;} namespace traits { template<> -struct is_group : public std::true_type { +struct is_group : public boost::true_type { }; template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/Point3.h b/gtsam/geometry/Point3.h index 7739f3d9c..09e340ad2 100644 --- a/gtsam/geometry/Point3.h +++ b/gtsam/geometry/Point3.h @@ -245,15 +245,15 @@ namespace gtsam { namespace traits { template<> - struct is_group : public std::true_type { + struct is_group : public boost::true_type { }; template<> - struct is_manifold : public std::true_type { + struct is_manifold : public boost::true_type { }; template<> - struct dimension : public std::integral_constant { + struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/Pose2.h b/gtsam/geometry/Pose2.h index f1cd6bd3f..f5042dc98 100644 --- a/gtsam/geometry/Pose2.h +++ b/gtsam/geometry/Pose2.h @@ -324,11 +324,11 @@ GTSAM_EXPORT boost::optional align(const std::vector& pairs); namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/Pose3.h b/gtsam/geometry/Pose3.h index 57132b453..a8b82bebe 100644 --- a/gtsam/geometry/Pose3.h +++ b/gtsam/geometry/Pose3.h @@ -357,15 +357,15 @@ GTSAM_EXPORT boost::optional align(const std::vector& pairs); namespace traits { template<> -struct is_group : public std::true_type { +struct is_group : public boost::true_type { }; template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/Rot2.h b/gtsam/geometry/Rot2.h index 55f7bad50..f45e9c7eb 100644 --- a/gtsam/geometry/Rot2.h +++ b/gtsam/geometry/Rot2.h @@ -246,15 +246,15 @@ namespace gtsam { namespace traits { template<> - struct is_group : public std::true_type { + struct is_group : public boost::true_type { }; template<> - struct is_manifold : public std::true_type { + struct is_manifold : public boost::true_type { }; template<> - struct dimension : public std::integral_constant { + struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/Rot3.h b/gtsam/geometry/Rot3.h index 88c0fe370..69a64bc51 100644 --- a/gtsam/geometry/Rot3.h +++ b/gtsam/geometry/Rot3.h @@ -493,15 +493,15 @@ namespace gtsam { namespace traits { template<> - struct is_group : public std::true_type { + struct is_group : public boost::true_type { }; template<> - struct is_manifold : public std::true_type { + struct is_manifold : public boost::true_type { }; template<> - struct dimension : public std::integral_constant { + struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/StereoCamera.h b/gtsam/geometry/StereoCamera.h index ca0377c1b..9db1976f6 100644 --- a/gtsam/geometry/StereoCamera.h +++ b/gtsam/geometry/StereoCamera.h @@ -158,11 +158,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> diff --git a/gtsam/geometry/StereoPoint2.h b/gtsam/geometry/StereoPoint2.h index 9da456b60..8c4ebd3a8 100644 --- a/gtsam/geometry/StereoPoint2.h +++ b/gtsam/geometry/StereoPoint2.h @@ -176,15 +176,15 @@ namespace gtsam { namespace traits { template<> - struct is_group : public std::true_type { + struct is_group : public boost::true_type { }; template<> - struct is_manifold : public std::true_type { + struct is_manifold : public boost::true_type { }; template<> - struct dimension : public std::integral_constant { + struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/geometry/Unit3.h b/gtsam/geometry/Unit3.h index 6a84e014c..1e9591a83 100644 --- a/gtsam/geometry/Unit3.h +++ b/gtsam/geometry/Unit3.h @@ -159,11 +159,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> diff --git a/gtsam/navigation/ImuBias.h b/gtsam/navigation/ImuBias.h index c08a37905..9bc24c152 100644 --- a/gtsam/navigation/ImuBias.h +++ b/gtsam/navigation/ImuBias.h @@ -221,15 +221,15 @@ namespace imuBias { namespace traits { template<> -struct is_group : public std::true_type { +struct is_group : public boost::true_type { }; template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; } diff --git a/gtsam/nonlinear/Values.h b/gtsam/nonlinear/Values.h index f6a8af3a1..e31bfa941 100644 --- a/gtsam/nonlinear/Values.h +++ b/gtsam/nonlinear/Values.h @@ -393,7 +393,7 @@ namespace gtsam { // supplied \c filter function. template static bool filterHelper(const boost::function filter, const ConstKeyValuePair& key_value) { - BOOST_STATIC_ASSERT((!std::is_same::value)); + BOOST_STATIC_ASSERT((!boost::is_same::value)); // Filter and check the type return filter(key_value.key) && (dynamic_cast*>(&key_value.value)); } diff --git a/gtsam/nonlinear/tests/testValues.cpp b/gtsam/nonlinear/tests/testValues.cpp index bfc156671..9b9e8d0e0 100644 --- a/gtsam/nonlinear/tests/testValues.cpp +++ b/gtsam/nonlinear/tests/testValues.cpp @@ -64,9 +64,9 @@ public: namespace gtsam { namespace traits { template <> -struct is_manifold : public std::true_type {}; +struct is_manifold : public boost::true_type {}; template <> -struct dimension : public std::integral_constant {}; +struct dimension : public boost::integral_constant {}; } } diff --git a/gtsam_unstable/dynamics/PoseRTV.h b/gtsam_unstable/dynamics/PoseRTV.h index 04da7c513..ae4ddade4 100644 --- a/gtsam_unstable/dynamics/PoseRTV.h +++ b/gtsam_unstable/dynamics/PoseRTV.h @@ -187,11 +187,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; template<> diff --git a/gtsam_unstable/geometry/Pose3Upright.h b/gtsam_unstable/geometry/Pose3Upright.h index a2db1d176..22aab5d44 100644 --- a/gtsam_unstable/geometry/Pose3Upright.h +++ b/gtsam_unstable/geometry/Pose3Upright.h @@ -144,11 +144,11 @@ private: namespace traits { template<> -struct is_manifold : public std::true_type { +struct is_manifold : public boost::true_type { }; template<> -struct dimension : public std::integral_constant { +struct dimension : public boost::integral_constant { }; }