31#ifndef ETL_FUNCTIONAL_INCLUDED
32#define ETL_FUNCTIONAL_INCLUDED
72 ETL_CONSTEXPR20
T& get()
const ETL_NOEXCEPT
77 ETL_CONSTEXPR20
operator T&()
const ETL_NOEXCEPT
102 template <
typename T>
109 template <
typename T>
124 template <
typename T>
131 template <
typename T>
138 template <
typename T>
142 template <
typename T>
149 template <
typename TArgumentType,
typename TResultType>
159 template <
typename TFirstArgumentType,
typename TSecondArgumentType,
typename TResultType>
168 template <
typename T =
void>
171 typedef T value_type;
173 ETL_CONSTEXPR
bool operator()(
const T &
lhs,
const T &
rhs)
const
185 template <
typename T1,
typename T2>
186 constexpr auto operator()(
T1&&
lhs,
T2&&
rhs)
const ->
decltype(
static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs))
188 return static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs);
194 template <
typename T =
void>
197 typedef T value_type;
199 ETL_CONSTEXPR
bool operator()(
const T&
lhs,
const T&
rhs)
const
211 template <
typename T1,
typename T2>
212 constexpr auto operator()(
T1&&
lhs,
T2&&
rhs)
const ->
decltype(
static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs))
214 return !(
static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs));
220 template <
typename T =
void>
223 typedef T value_type;
225 ETL_CONSTEXPR
bool operator()(
const T &
lhs,
const T &
rhs)
const
237 template <
typename T1,
typename T2>
238 constexpr auto operator()(
T1&&
lhs,
T2&&
rhs)
const ->
decltype(
static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs))
240 return static_cast<T2&&
>(
rhs) <
static_cast<T1&&
>(
lhs);
246 template <
typename T =
void>
249 typedef T value_type;
251 ETL_CONSTEXPR
bool operator()(
const T&
lhs,
const T&
rhs)
const
263 template <
typename T1,
typename T2>
264 constexpr auto operator()(
T1&&
lhs,
T2&&
rhs)
const ->
decltype(
static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs))
266 return static_cast<T1&&
>(
rhs) <
static_cast<T2&&
>(
lhs);
272 template <
typename T =
void>
275 typedef T value_type;
277 ETL_CONSTEXPR
bool operator()(
const T &
lhs,
const T &
rhs)
const
287 typedef void value_type;
290 template <
typename T1,
typename T2>
291 constexpr auto operator()(
T1&&
lhs,
T2&&
rhs)
const ->
decltype(
static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs))
293 return static_cast<T1&&
>(
lhs) ==
static_cast<T2&&
>(
rhs);
299 template <
typename T =
void>
302 typedef T value_type;
304 ETL_CONSTEXPR
bool operator()(
const T &
lhs,
const T &
rhs)
const
316 template <
typename T1,
typename T2>
317 constexpr auto operator()(
T1&&
lhs,
T2&&
rhs)
const ->
decltype(
static_cast<T1&&
>(
lhs) <
static_cast<T2&&
>(
rhs))
319 return !(
static_cast<T1&&
>(
lhs) ==
static_cast<T2&&
>(
rhs));
325 template <
typename TFunction>
331 typename TFunction::first_argument_type value;
336 : operation(
f), value(
v)
340 typename TFunction::result_type operator()(
typename TFunction::second_argument_type& x)
const
342 return operation(value, x);
345 typename TFunction::result_type operator()(
const typename TFunction::second_argument_type& x)
const
347 return operation(value, x);
351 template <
typename F,
typename T>
358 template <
typename TFunction >
363 typename TFunction::second_argument_type value;
366 : operation(
f), value(
v)
370 typename TFunction::result_type operator()(
typename TFunction::first_argument_type& x)
const
372 return operation(x, value);
375 typename TFunction::result_type operator()(
const typename TFunction::first_argument_type& x)
const
377 return operation(x, value);
381 template <
typename F,
typename T>
388 template <
typename T =
void>
391 typedef T first_argument_type;
392 typedef T second_argument_type;
393 typedef T result_type;
395 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
402 template <
typename T =
void>
405 typedef T first_argument_type;
406 typedef T second_argument_type;
407 typedef T result_type;
409 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
416 template <
typename T =
void>
419 typedef T argument_type;
420 typedef T result_type;
422 ETL_CONSTEXPR
T operator()(
const T&
lhs)
const
429 template <
typename T =
void>
432 typedef T first_argument_type;
433 typedef T second_argument_type;
434 typedef T result_type;
436 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
443 template <
typename T =
void>
446 typedef T first_argument_type;
447 typedef T second_argument_type;
448 typedef T result_type;
450 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
457 template <
typename T =
void>
460 typedef T first_argument_type;
461 typedef T second_argument_type;
462 typedef T result_type;
464 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
471 template <
typename T =
void>
474 typedef T first_argument_type;
475 typedef T second_argument_type;
476 typedef T result_type;
478 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
485 template <
typename T =
void>
488 typedef T first_argument_type;
489 typedef T second_argument_type;
490 typedef T result_type;
492 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
499 template <
typename T =
void>
502 typedef T first_argument_type;
503 typedef T second_argument_type;
504 typedef T result_type;
506 ETL_CONSTEXPR
T operator()(
const T&
lhs)
const
513 template <
typename T =
void>
516 typedef T first_argument_type;
517 typedef T second_argument_type;
518 typedef T result_type;
520 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
527 template <
typename T =
void>
530 typedef T first_argument_type;
531 typedef T second_argument_type;
532 typedef T result_type;
534 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
541 template <
typename T =
void>
544 typedef T first_argument_type;
545 typedef T second_argument_type;
546 typedef T result_type;
548 ETL_CONSTEXPR
T operator()(
const T&
lhs,
const T&
rhs)
const
555 template <
typename T =
void>
558 typedef T first_argument_type;
559 typedef T second_argument_type;
560 typedef T result_type;
562 ETL_CONSTEXPR
T operator()(
const T&
lhs)
const
577 typedef TReturnType(TClassType::* MemberFunctionType)(TArgs...);
579 ETL_CONSTEXPR mem_fn_impl(MemberFunctionType member_function_)
580 : member_function(member_function_)
584 ETL_CONSTEXPR TReturnType operator()(TClassType& instance, TArgs... args)
const
591 MemberFunctionType member_function;
600 typedef TReturnType(TClassType::* MemberFunctionType)(TArgs...) const;
602 ETL_CONSTEXPR const_mem_fn_impl(MemberFunctionType member_function_)
603 : member_function(member_function_)
607 ETL_CONSTEXPR TReturnType operator()(
const TClassType& instance, TArgs... args)
const
614 MemberFunctionType member_function;
Definition functional.h:327
Definition functional.h:360
Definition functional.h:51
bitset_ext
Definition absolute.h:38
ETL_NODISCARD ETL_CONSTEXPR14 T round_half_even_unscaled(T value) ETL_NOEXCEPT
Definition scaled_rounding.h:314
binary_function
Definition functional.h:161
Definition functional.h:515
Definition functional.h:557
Definition functional.h:529
Definition functional.h:543
Definition functional.h:445
Definition functional.h:274
Definition functional.h:248
Definition functional.h:222
Definition functional.h:196
Definition functional.h:170
Definition functional.h:473
Definition functional.h:501
Definition functional.h:487
Definition functional.h:404
Definition functional.h:459
Definition functional.h:431
Definition functional.h:418
Definition functional.h:301
Definition functional.h:390
unary_function
Definition functional.h:151
unwrap_ref_decay.
Definition functional.h:139
unwrap_reference.
Definition functional.h:120