mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Made the list reductions less ambiguous.
This commit is contained in:
parent
3149b5b148
commit
a685a6beed
@ -259,22 +259,20 @@ template<
|
||||
|
||||
template<
|
||||
typename Reducer,
|
||||
typename A,
|
||||
typename... Ts
|
||||
> struct reduce<Reducer, A, Ts...>
|
||||
typename A
|
||||
> struct reduce<Reducer, A>
|
||||
{
|
||||
constexpr static inline A run(A a, Ts...) { return a; }
|
||||
constexpr static inline A run(A a) { return a; }
|
||||
};
|
||||
|
||||
template<
|
||||
typename Reducer,
|
||||
typename A,
|
||||
typename B,
|
||||
typename... Ts
|
||||
> struct reduce<Reducer, A, B, Ts...>
|
||||
> struct reduce<Reducer, A, Ts...>
|
||||
{
|
||||
constexpr static inline auto run(A a, B b, Ts... ts) -> decltype(Reducer::run(a, reduce<Reducer, B, Ts...>::run(b, ts...))) {
|
||||
return Reducer::run(a, reduce<Reducer, B, Ts...>::run(b, ts...));
|
||||
constexpr static inline auto run(A a, Ts... ts) -> decltype(Reducer::run(a, reduce<Reducer, Ts...>::run(ts...))) {
|
||||
return Reducer::run(a, reduce<Reducer, Ts...>::run(ts...));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user