Make base class constructors available (including initializer lists).
parent
a3b177c604
commit
2fe4c83680
|
@ -56,15 +56,7 @@ public:
|
||||||
typedef std::set<VALUE, std::less<VALUE>,
|
typedef std::set<VALUE, std::less<VALUE>,
|
||||||
typename internal::FastDefaultAllocator<VALUE>::type> Base;
|
typename internal::FastDefaultAllocator<VALUE>::type> Base;
|
||||||
|
|
||||||
/** Default constructor */
|
using Base::Base; // Inherit the set constructors
|
||||||
FastSet() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Constructor from a range, passes through to base class */
|
|
||||||
template<typename INPUTITERATOR>
|
|
||||||
explicit FastSet(INPUTITERATOR first, INPUTITERATOR last) :
|
|
||||||
Base(first, last) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Constructor from a iterable container, passes through to base class */
|
/** Constructor from a iterable container, passes through to base class */
|
||||||
template<typename INPUTCONTAINER>
|
template<typename INPUTCONTAINER>
|
||||||
|
|
|
@ -50,18 +50,14 @@ public:
|
||||||
Ordering() {
|
Ordering() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using KeyVector::KeyVector; // Inherit the KeyVector's constructors
|
||||||
|
|
||||||
/// Create from a container
|
/// Create from a container
|
||||||
template<typename KEYS>
|
template<typename KEYS>
|
||||||
explicit Ordering(const KEYS& keys) :
|
explicit Ordering(const KEYS& keys) :
|
||||||
Base(keys.begin(), keys.end()) {
|
Base(keys.begin(), keys.end()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create an ordering using iterators over keys
|
|
||||||
template<typename ITERATOR>
|
|
||||||
Ordering(ITERATOR firstKey, ITERATOR lastKey) :
|
|
||||||
Base(firstKey, lastKey) {
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Add new variables to the ordering as ordering += key1, key2, ... Equivalent to calling
|
/// Add new variables to the ordering as ordering += key1, key2, ... Equivalent to calling
|
||||||
/// push_back.
|
/// push_back.
|
||||||
boost::assign::list_inserter<boost::assign_detail::call_push_back<This> > operator+=(
|
boost::assign::list_inserter<boost::assign_detail::call_push_back<This> > operator+=(
|
||||||
|
@ -195,7 +191,7 @@ public:
|
||||||
KeySet src = fg.keys();
|
KeySet src = fg.keys();
|
||||||
KeyVector keys(src.begin(), src.end());
|
KeyVector keys(src.begin(), src.end());
|
||||||
std::stable_sort(keys.begin(), keys.end());
|
std::stable_sort(keys.begin(), keys.end());
|
||||||
return Ordering(keys);
|
return Ordering(keys.begin(), keys.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// METIS Formatting function
|
/// METIS Formatting function
|
||||||
|
|
Loading…
Reference in New Issue