diff --git a/gtsam/base/FastSet.h b/gtsam/base/FastSet.h index 906412f4d..e93f056f6 100644 --- a/gtsam/base/FastSet.h +++ b/gtsam/base/FastSet.h @@ -56,15 +56,7 @@ public: typedef std::set, typename internal::FastDefaultAllocator::type> Base; - /** Default constructor */ - FastSet() { - } - - /** Constructor from a range, passes through to base class */ - template - explicit FastSet(INPUTITERATOR first, INPUTITERATOR last) : - Base(first, last) { - } + using Base::Base; // Inherit the set constructors /** Constructor from a iterable container, passes through to base class */ template diff --git a/gtsam/inference/Ordering.h b/gtsam/inference/Ordering.h index c9c6a6176..e875ed961 100644 --- a/gtsam/inference/Ordering.h +++ b/gtsam/inference/Ordering.h @@ -50,18 +50,14 @@ public: Ordering() { } + using KeyVector::KeyVector; // Inherit the KeyVector's constructors + /// Create from a container template explicit Ordering(const KEYS& keys) : Base(keys.begin(), keys.end()) { } - /// Create an ordering using iterators over keys - template - Ordering(ITERATOR firstKey, ITERATOR lastKey) : - Base(firstKey, lastKey) { - } - /// Add new variables to the ordering as ordering += key1, key2, ... Equivalent to calling /// push_back. boost::assign::list_inserter > operator+=( @@ -195,7 +191,7 @@ public: KeySet src = fg.keys(); KeyVector keys(src.begin(), src.end()); std::stable_sort(keys.begin(), keys.end()); - return Ordering(keys); + return Ordering(keys.begin(), keys.end()); } /// METIS Formatting function