Remove C++14isms from delayed_helper::apply()
Clang to the rescue: - `void` isn't a literal type in C++11 - calling `f()` from `constexpr` isn't allowed in C++11 So, remove `constexpr` to simplify things.
This commit is contained in:
parent
5e207afff6
commit
a55e06c676
@ -55,13 +55,13 @@ namespace delayed_helper
|
||||
|
||||
// See https://aherrmann.github.io/programming/2016/02/28/unpacking-tuples-in-cpp14/
|
||||
template<typename F, typename T, size_t... Is>
|
||||
constexpr void apply_impl(F f, T t, index_sequence<Is...>)
|
||||
void apply_impl(F f, T t, index_sequence<Is...>)
|
||||
{
|
||||
f(std::get<Is>(t)...);
|
||||
}
|
||||
|
||||
template <typename T, typename F>
|
||||
constexpr void apply(F f, T t)
|
||||
void apply(F f, T t)
|
||||
{
|
||||
apply_impl(f, t, make_index_sequence<std::tuple_size<T>{}>{});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user