Why the code below does not compile?

```
template <typename T>
T sum(T t){
    return t;
}

template <typename T, typename ...U>
auto sum(T t, U... u) -> decltype(t + sum(u...)) {
    return t + sum(u...);
}

int main() {
    sum(1, 1.5, 2);
}

```

Compilation error:

```
error: no matching function for call to ‘sum(int, double, int)’
 sum(1, 1.5, 2);

```

What would be a good workaround to implement this feature?