#include <iostream>
#include <type_traits>
#include <eve/traits/overload.hpp>
#include <eve/module/core.hpp>
{
template<typename Options>
struct func_t :
callable<func_t, Options, conditional_option>
{
template<eve::integral_value T>
};
inline constexpr auto func = functor<func_t>;
template<typename Options>
struct other_func_t : callable<other_func_t, Options, relative_conditional_option>
{
template<eve::integral_value T>
};
inline constexpr auto other_func = functor<other_func_t>;
};
namespace eve::detail
{
{
auto const mask = opts[condition_key];
if constexpr(decltype(mask)::is_complete) return x*x;
}
{
auto const mask = opts[condition_key];
if constexpr(decltype(mask)::is_complete) return x/10;
}
}
template<typename Func, typename Opt>
{
std::cout << eve::func(8) << "\n";
std::cout << eve::func[false](8) << "\n";
std::cout << "Is func[bool] supported: "
<< std::boolalpha << can_be_decorated_with<eve::tag_t<eve::func>, bool>
<< "\n";
std::cout << "Is func[eve::keep_between] supported: "
<< "\n";
std::cout << "Is other_func[bool] supported: "
<< std::boolalpha << can_be_decorated_with<eve::tag_t<eve::other_func>, bool>
<< "\n";
std::cout << "Is other_func[eve::keep_between] supported: "
<< std::boolalpha << can_be_decorated_with<eve::tag_t<eve::other_func>,
eve::keep_between>
<< "\n";
}
The concept integral_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:51
constexpr auto mul
tuple_callable computing the product of its arguments.
Definition mul.hpp:127
#define EVE_CALLABLE_OBJECT(TYPE, NAME)
Generate the generic function interface for an actual eve::callable.
Definition protocol.hpp:157
#define EVE_REQUIRES(ARCH)
Flag a function to support delayed calls on given architecture.
Definition protocol.hpp:226
#define EVE_DISPATCH_CALL(...)
Generate the proper call to current EVE's Callable Object implementation.
Definition protocol.hpp:194
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition translation.hpp:107
EVE Main Namespace.
Definition abi.hpp:19
CRTP base class defining an EVE's Callable Object.
Definition callable.hpp:49
Conditional expression keeping all lanes between two position.
Definition conditional.hpp:528