Lines Matching full:second

23  * \brief Template class that is either type of First or Second.
32 * \brief Object containing Either First or Second type of object
34 * \note Type First and Second are always aligned to same alignment as
37 * sizeof(Second*)) + sizeof(uint64_t) of memory.
39 template <typename First, typename Second>
44 Either(const Second &second);
47 Either(const Either<First, Second> &other);
48 Either &operator=(const Either<First, Second> &other);
51 Either &operator=(const Second &second);
57 const Second &getSecond(void) const;
73 Second *m_second;
78 uint8_t m_data[sizeof(First) > sizeof(Second) ? sizeof(First) : sizeof(Second)];
86 template <typename Type, typename First, typename Second>
89 template <typename First, typename Second>
90 struct Get<First, First, Second>
92 static const First &get(const Either<First, Second> &either) in get()
98 template <typename First, typename Second>
99 struct Get<Second, First, Second>
101 static const Second &get(const Either<First, Second> &either) in get()
107 template <typename Type, typename First, typename Second>
108 const Type &get(const Either<First, Second> &either) in get()
110 return Get<Type, First, Second>::get(either); in get()
113 template <typename Type, typename First, typename Second>
116 template <typename First, typename Second>
117 struct Is<First, First, Second>
119 static bool is(const Either<First, Second> &either) in is()
125 template <typename First, typename Second>
126 struct Is<Second, First, Second>
128 static bool is(const Either<First, Second> &either) in is()
134 template <typename Type, typename First, typename Second>
135 bool is(const Either<First, Second> &either) in is()
137 return Is<Type, First, Second>::is(either); in is()
142 template <typename First, typename Second>
143 void Either<First, Second>::release(void) in release()
148 m_second->~Second(); in release()
154 template <typename First, typename Second>
155 Either<First, Second>::Either(const First &first) : m_isFirst(true) in Either()
160 template <typename First, typename Second>
161 Either<First, Second>::Either(const Second &second) : m_isFirst(false) in Either() argument
163 m_second = new (m_data) Second(second); in Either()
166 template <typename First, typename Second>
167 Either<First, Second>::~Either(void) in ~Either()
172 template <typename First, typename Second>
173 Either<First, Second>::Either(const Either<First, Second> &other) : m_isFirst(other.m_isFirst) in Either()
178 m_second = new (m_data) Second(*other.m_second); in Either()
181 template <typename First, typename Second>
182 Either<First, Second> &Either<First, Second>::operator=(const Either<First, Second> &other) in operator =()
194 m_second = new (m_data) Second(*other.m_second); in operator =()
199 template <typename First, typename Second>
200 Either<First, Second> &Either<First, Second>::operator=(const First &first) in operator =()
210 template <typename First, typename Second>
211 Either<First, Second> &Either<First, Second>::operator=(const Second &second) in operator =() argument
216 m_second = new (m_data) Second(second); in operator =()
221 template <typename First, typename Second>
222 bool Either<First, Second>::isFirst(void) const in isFirst()
227 template <typename First, typename Second>
228 bool Either<First, Second>::isSecond(void) const in isSecond()
233 template <typename First, typename Second>
234 const First &Either<First, Second>::getFirst(void) const in getFirst()
240 template <typename First, typename Second>
241 const Second &Either<First, Second>::getSecond(void) const in getSecond()
247 template <typename First, typename Second>
249 const Type &Either<First, Second>::get(void) const in get()
251 return EitherDetail::get<Type, First, Second>(*this); in get()
254 template <typename First, typename Second>
256 bool Either<First, Second>::is(void) const in is()
258 return EitherDetail::is<Type, First, Second>(*this); in is()