Go to the documentation of this file.
19 #ifndef viskores_Pair_h
20 #define viskores_Pair_h
36 template <
typename T1,
typename T2>
79 :
first(std::move(firstSrc))
80 ,
second(std::move(secondSrc))
87 template <
typename U1,
typename U2>
94 template <
typename U1,
typename U2>
96 noexcept(U1{ std::declval<U1&&>() }, U2{ std::declval<U2&&>() }))
102 template <
typename U1,
typename U2>
109 template <
typename U1,
typename U2>
111 U2{ std::declval<U2&&>() }))
125 return ((this->first == other.
first) && (this->second == other.
second));
131 return !(*
this == other);
140 return ((this->first < other.
first) ||
141 (!(other.
first < this->first) && (this->second < other.
second)));
150 return (other < *
this);
159 return !(other < *
this);
168 return !(*
this < other);
175 template <
typename T,
typename U>
182 template <
typename T1,
typename T2>
186 using DT1 =
typename std::decay<T1>::type;
187 using DT2 =
typename std::decay<T2>::type;
190 return PairT(std::forward<T1>(v1), std::forward<T2>(v2));
195 #endif //viskores_Pair_h
T1 FirstType
The type of the first object.
Definition: Pair.h:41
viskores::Pair< typename std::decay< T1 >::type, typename std::decay< T2 >::type > make_Pair(T1 &&v1, T2 &&v2)
Definition: Pair.h:184
Pair(viskores::Pair< U1, U2 > &&src) noexcept(noexcept(U1{ std::declval< U1 && >() }, U2{ std::declval< U2 && >() }))
Definition: Pair.h:95
Pair(std::pair< U1, U2 > &&src) noexcept(noexcept(U1{ std::declval< U1 && >() }, U2{ std::declval< U2 && >() }))
Definition: Pair.h:110
bool operator>=(const viskores::Pair< FirstType, SecondType > &other) const
Tests ordering on the first object, and then on the second object if the first are equal.
Definition: Pair.h:166
bool operator>(const viskores::Pair< FirstType, SecondType > &other) const
Tests ordering on the first object, and then on the second object if the first are equal.
Definition: Pair.h:148
#define VISKORES_SUPPRESS_EXEC_WARNINGS
Definition: ExportMacros.h:61
VISKORES_EXEC_CONT viskores::Vec< T, Size > operator+(viskores::Vec< T, Size > a, const viskores::Vec< T, Size > &b)
Definition: VecOperators.h:100
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
FirstType first_type
The same as FirstType, but follows the naming convention of std::pair.
Definition: Pair.h:49
Pair(FirstType &&firstSrc, SecondType &&secondSrc) noexcept(noexcept(FirstType{ std::declval< FirstType && >() }, SecondType{ std::declval< SecondType && >() }))
Definition: Pair.h:76
SecondType second_type
The same as SecondType, but follows the naming convention of std::pair.
Definition: Pair.h:53
Groups connected points that have the same field value.
Definition: Atomic.h:27
FirstType first
The pair's first object.
Definition: Pair.h:58
Pair(const FirstType &firstSrc, const SecondType &secondSrc)
Definition: Pair.h:68
viskores::Pair< FirstType, SecondType > & operator=(const viskores::Pair< FirstType, SecondType > &src)=default
bool operator!=(const viskores::Pair< FirstType, SecondType > &other) const
Definition: Pair.h:129
A viskores::Pair is essentially the same as an STL pair object except that the methods (constructors ...
Definition: Pair.h:37
Pair(const viskores::Pair< U1, U2 > &src)
Definition: Pair.h:88
Pair(const std::pair< U1, U2 > &src)
Definition: Pair.h:103
bool operator<(const viskores::Pair< FirstType, SecondType > &other) const
Tests ordering on the first object, and then on the second object if the first are equal.
Definition: Pair.h:138
SecondType second
The pair's second object.
Definition: Pair.h:63
bool operator<=(const viskores::Pair< FirstType, SecondType > &other) const
Tests ordering on the first object, and then on the second object if the first are equal.
Definition: Pair.h:157
T2 SecondType
The type of the second object.
Definition: Pair.h:45
bool operator==(const viskores::Pair< FirstType, SecondType > &other) const
Definition: Pair.h:123