summaryrefslogtreecommitdiff
path: root/src/core/smallmap_type.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/smallmap_type.hpp')
-rw-r--r--src/core/smallmap_type.hpp30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp
index 478e7515a..931a4848b 100644
--- a/src/core/smallmap_type.hpp
+++ b/src/core/smallmap_type.hpp
@@ -11,40 +11,26 @@
#define SMALLMAP_TYPE_HPP
#include "smallvec_type.hpp"
+#include <utility>
/**
- * Simple pair of data. Both types have to be POD ("Plain Old Data")!
- * @tparam T Key type.
- * @tparam U Value type.
- */
-template <typename T, typename U>
-struct SmallPair {
- T first;
- U second;
-
- /** Initializes this Pair with data */
- inline SmallPair(const T &first, const U &second) : first(first), second(second) { }
- SmallPair() = default;
-};
-
-/**
- * Implementation of simple mapping class. Both types have to be POD ("Plain Old Data")!
- * It has inherited accessors from SmallVector().
+ * Implementation of simple mapping class.
+ * It has inherited accessors from std::vector().
* @tparam T Key type.
* @tparam U Value type.
* @tparam S Unit of allocation.
*
- * @see SmallVector
+ * @see std::vector
*/
template <typename T, typename U>
-struct SmallMap : std::vector<SmallPair<T, U> > {
- typedef ::SmallPair<T, U> Pair;
+struct SmallMap : std::vector<std::pair<T, U> > {
+ typedef std::pair<T, U> Pair;
typedef Pair *iterator;
typedef const Pair *const_iterator;
- /** Creates new SmallMap. Data are initialized in SmallVector constructor */
+ /** Creates new SmallMap. Data are initialized in std::vector constructor */
inline SmallMap() { }
- /** Data are freed in SmallVector destructor */
+ /** Data are freed in std::vector destructor */
inline ~SmallMap() { }
/**