26 #ifndef SRC_TILEDARRAY_META_H_
27 #define SRC_TILEDARRAY_META_H_
30 #include <madness/world/future.h>
31 #include <madness/world/world.h>
32 #include <madness/world/world_task_queue.h>
38 template <
bool head,
bool... tail>
45 static constexpr
bool value = b;
51 template <
typename Function,
typename... Args>
52 auto invoke(Function&& fn, Args&&... args) ->
typename std::enable_if<
54 decltype(fn(args...))>::type {
55 return fn(std::forward<Args>(args)...);
59 typename Function,
typename... Args,
60 typename =
typename std::enable_if<or_reduce<
61 false, madness::is_future<std::decay_t<Args>>::value...>::value>::type>
62 auto invoke(Function&& fn, Args&&... args) {
64 std::forward<Args>(args)...);
70 #endif // SRC_TILEDARRAY_META_H_