From c707059af1791a8966167ff7ac761b73750cdb60 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 7 Nov 2013 21:41:19 +0000 Subject: [PATCH] Added const dereference to ValueWithDefault --- gtsam/base/types.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtsam/base/types.h b/gtsam/base/types.h index 91614b4f3..935ab685e 100644 --- a/gtsam/base/types.h +++ b/gtsam/base/types.h @@ -109,6 +109,9 @@ namespace gtsam { /** Operator to access the value */ T& operator*() { return value; } + /** Operator to access the value */ + const T& operator*() const { return value; } + /** Implicit conversion allows use in if statements for bool type, etc. */ operator T() const { return value; } };