diff --git a/gtsam/base/concepts.h b/gtsam/base/concepts.h index 119d3b16a..ab4e589b4 100644 --- a/gtsam/base/concepts.h +++ b/gtsam/base/concepts.h @@ -157,14 +157,24 @@ check_invariants(const T& a, const T& b, double tol = 1e-9) { } } // \ namespace group +#define GTSAM_GROUP_IDENTITY0(GROUP) \ +namespace group { namespace traits { \ +template<> struct identity { static const GROUP value; typedef GROUP value_type;};\ +const GROUP identity::value = GROUP::Identity();\ +}} + +#define GTSAM_GROUP_IDENTITY(TEMPLATE,GROUP) \ +namespace group { namespace traits { \ +template