math_util: rvalue references for std::forward
This commit is contained in:
parent
3fdaf77c7a
commit
5bc164adb9
@ -16,7 +16,7 @@ namespace Common {
|
||||
* do not work when the /permissive- flag is enabled.
|
||||
*/
|
||||
template<typename T, typename... Ts>
|
||||
constexpr T Sum(T first, Ts ...rest) {
|
||||
constexpr T Sum(T first, Ts&&... rest) {
|
||||
if constexpr (sizeof...(rest) == 0) {
|
||||
return first;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user