| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef ANDROID_HWUI_PAIR_H |
| 18 |
#define ANDROID_HWUI_PAIR_H |
| 19 |
|
| 20 |
#include <utils/TypeHelpers.h> |
| 21 |
|
| 22 |
namespace android { |
| 23 |
namespace uirenderer { |
| 24 |
|
| 25 |
template <typename F, typename S> |
| 26 |
struct Pair { |
| 27 |
F first; |
| 28 |
S second; |
| 29 |
|
| 30 |
Pair() {} |
| 31 |
Pair(const Pair& o) : first(o.first), second(o.second) {} |
| 32 |
Pair(const F& f, const S& s) : first(f), second(s) {} |
| 33 |
|
| 34 |
inline const F& getFirst() const { return first; } |
| 35 |
|
| 36 |
inline const S& getSecond() const { return second; } |
| 37 |
}; |
| 38 |
|
| 39 |
} |
| 40 |
|
| 41 |
template <typename F, typename S> |
| 42 |
struct trait_trivial_ctor<uirenderer::Pair<F, S> > { |
| 43 |
enum { value = aggregate_traits<F, S>::has_trivial_ctor }; |
| 44 |
}; |
| 45 |
template <typename F, typename S> |
| 46 |
struct trait_trivial_dtor<uirenderer::Pair<F, S> > { |
| 47 |
enum { value = aggregate_traits<F, S>::has_trivial_dtor }; |
| 48 |
}; |
| 49 |
template <typename F, typename S> |
| 50 |
struct trait_trivial_copy<uirenderer::Pair<F, S> > { |
| 51 |
enum { value = aggregate_traits<F, S>::has_trivial_copy }; |
| 52 |
}; |
| 53 |
template <typename F, typename S> |
| 54 |
struct trait_trivial_move<uirenderer::Pair<F, S> > { |
| 55 |
enum { value = aggregate_traits<F, S>::has_trivial_move }; |
| 56 |
}; |
| 57 |
|
| 58 |
} |
| 59 |
|
| 60 |
#endif |