math_util: rvalue references for std::forward
This commit is contained in:
parent
a2f8cdf0a3
commit
be907a61f7
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ namespace Common {
|
||||||
* do not work when the /permissive- flag is enabled.
|
* do not work when the /permissive- flag is enabled.
|
||||||
*/
|
*/
|
||||||
template<typename T, typename... Ts>
|
template<typename T, typename... Ts>
|
||||||
constexpr T Sum(T first, Ts ...rest) {
|
constexpr T Sum(T first, Ts&&... rest) {
|
||||||
if constexpr (sizeof...(rest) == 0) {
|
if constexpr (sizeof...(rest) == 0) {
|
||||||
return first;
|
return first;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue