|
template<bool x, class T > |
using | only_if = conditional_t< x, T, detail::DISABLE< T > > |
|
template<class... > |
using | void_t = void |
|
template<class... > |
using | true_t = true_type |
|
template<class... > |
using | false_t = false_type |
|
template<bool Bool> |
using | truth_type = conditional_t< Bool, true_type, false_type > |
|
template<bool cond> |
using | not_type = conditional_t< cond, false_type, true_type > |
|
template<template< class > class func, class TestType , class DefaultType > |
using | conditional_detected_t = typename conditional_detected< func, TestType, DefaultType >::type |
|
template<class T > |
using | query_value_type = typename T::value_type |
|
template<class T > |
using | query_allocator_type = typename T::allocator_type |
|
template<class T > |
using | query_system_tag = typename T::system_tag |
|
template<class T > |
using | query_get_stream = decltype(std::declval< T >().get_stream) |
|
template<class T > |
using | query_get_allocator = decltype(std::declval< T >().get_allocator) |
|
|
template<class Function , class... Args> |
Bind< Function, Args &&... > | bind (Function function, Args &&... args) |
|
template<bool cond, class f1 , class f2 > |
auto | constexpr_ternary (f1 true_path, f2 false_path) |
| C++ 11/14 version of constexpr if. More...
|
|
template<bool Bool, class Function > |
auto | constexpr_if (Function function) |
|
template<bool Bool, class F1 , class F2 > |
auto | constexpr_if (F1 f1, F2 f2) |
|
template<bool Bool, class Function > |
auto | constexpr_else_if (Function function) |
|
template<bool Bool, class F1 , class F2 > |
auto | constexpr_else_if (F1 f1, F2 f2) |
|
template<class Function > |
auto | constexpr_else (Function function) |
|
template<int Index, class... Args> |
__host__ __device__ auto | get (Args &&... args) -> decltype(detail::get_impl(Integer< Index >(), std::forward< Args >(args)...)) |
|
template<class... Args> |
auto | get_last (Args &&... args) -> decltype(get< sizeof...(Args) -1 >(std::forward< Args >(args)...)) |
|
template<class Arg , class... Args> |
auto | get_first (Arg &&arg, Args &&... args) -> decltype(std::forward< Arg >(arg)) |
|
template<bool cond, class f1 , class f2 >
auto bc::traits::constexpr_ternary |
( |
f1 |
true_path, |
|
|
f2 |
false_path |
|
) |
| |
C++ 11/14 version of constexpr if.
(Required because NVCC doesn't support C++17)
Accepts a constexpr bool template argument, and one or two functors (that take no arguments) if true, calls and returns the first functor, else the second.
Example:
int main() { return bc::traits::constexpr_if<true>( []() { std::cout << " constexpr_boolean is true " << std::endl; return true; }, []() { std::cout << " constexpr_boolean is false " << std::endl; return false; } ); } output: constexpr_boolean is true