refs #296 construct a CGeodesicGrid from another container

This commit is contained in:
Mathew Sutcliffe
2014-07-19 00:39:59 +01:00
parent 2cd664d533
commit 2cf690d4fe

View File

@@ -41,6 +41,13 @@ namespace BlackMisc
//! Iterator
typedef typename QMultiMap<Key, T>::const_iterator const_iterator;
//! Constructor
//@{
CGeodesicGrid() {}
template <template <class...> class C> explicit CGeodesicGrid(const C<T> &container) { for (const auto &v : container) { insert(v); } }
template <class I> explicit CGeodesicGrid(CRange<I> range) { for (const auto &v : range) { insert(v); } }
//@}
//! Begin and end iterators of the underlying storage.
//! @{
const_iterator begin() const { return m_map.begin(); }