|
|
@@ -20,6 +20,9 @@ struct Pair<T1, T2, 0, 0>
|
|
|
{
|
|
|
ALLOCATOR_AWARE;
|
|
|
|
|
|
+ T1 first;
|
|
|
+ T2 second;
|
|
|
+
|
|
|
Pair(T1& f, T2& s)
|
|
|
: first(f)
|
|
|
, second(s)
|
|
|
@@ -29,9 +32,6 @@ struct Pair<T1, T2, 0, 0>
|
|
|
Pair(Allocator& /*a*/)
|
|
|
{
|
|
|
}
|
|
|
-
|
|
|
- T1 first;
|
|
|
- T2 second;
|
|
|
};
|
|
|
|
|
|
template <typename T1, typename T2>
|
|
|
@@ -39,6 +39,9 @@ struct Pair<T1, T2, 1, 0>
|
|
|
{
|
|
|
ALLOCATOR_AWARE;
|
|
|
|
|
|
+ T1 first;
|
|
|
+ T2 second;
|
|
|
+
|
|
|
Pair(T1& f, T2& s)
|
|
|
: first(f)
|
|
|
, second(s)
|
|
|
@@ -49,9 +52,6 @@ struct Pair<T1, T2, 1, 0>
|
|
|
: first(a)
|
|
|
{
|
|
|
}
|
|
|
-
|
|
|
- T1 first;
|
|
|
- T2 second;
|
|
|
};
|
|
|
|
|
|
template <typename T1, typename T2>
|
|
|
@@ -59,6 +59,9 @@ struct Pair<T1, T2, 0, 1>
|
|
|
{
|
|
|
ALLOCATOR_AWARE;
|
|
|
|
|
|
+ T1 first;
|
|
|
+ T2 second;
|
|
|
+
|
|
|
Pair(T1& f, T2& s)
|
|
|
: first(f)
|
|
|
, second(s)
|
|
|
@@ -69,9 +72,6 @@ struct Pair<T1, T2, 0, 1>
|
|
|
: second(a)
|
|
|
{
|
|
|
}
|
|
|
-
|
|
|
- T1 first;
|
|
|
- T2 second;
|
|
|
};
|
|
|
|
|
|
template <typename T1, typename T2>
|
|
|
@@ -79,6 +79,9 @@ struct Pair<T1, T2, 1, 1>
|
|
|
{
|
|
|
ALLOCATOR_AWARE;
|
|
|
|
|
|
+ T1 first;
|
|
|
+ T2 second;
|
|
|
+
|
|
|
Pair(T1& f, T2& s)
|
|
|
: first(f)
|
|
|
, second(s)
|
|
|
@@ -90,22 +93,10 @@ struct Pair<T1, T2, 1, 1>
|
|
|
, second(a)
|
|
|
{
|
|
|
}
|
|
|
-
|
|
|
- T1 first;
|
|
|
- T2 second;
|
|
|
};
|
|
|
|
|
|
#define PAIR(first, second) Pair<first, second, IS_ALLOCATOR_AWARE(first), IS_ALLOCATOR_AWARE(second)>
|
|
|
|
|
|
-template <typename T1, typename T2>
|
|
|
-PAIR(T1, T2) make_pair(Allocator& a, T1 first, T2 second)
|
|
|
-{
|
|
|
- PAIR(T1, T2) pair(a);
|
|
|
- pair.first = first;
|
|
|
- pair.second = second;
|
|
|
- return pair;
|
|
|
-}
|
|
|
-
|
|
|
template <typename T1, typename T2>
|
|
|
inline void swap(Pair<T1, T2, 0, 0>& a, Pair<T1, T2, 0, 0>& b)
|
|
|
{
|