Browse Source

Use perfect forwarding

adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
15de7aed9a
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/global.h

2
src/base/global.h

@ -42,7 +42,7 @@ constexpr typename std::add_const_t<T> &asConst(T &t) noexcept { return t; }
// Forward rvalue as const // Forward rvalue as const
template <typename T> template <typename T>
constexpr typename std::add_const_t<T> asConst(T &&t) noexcept { return std::move(t); } constexpr typename std::add_const_t<T> asConst(T &&t) noexcept { return std::forward<T>(t); }
// Prevent const rvalue arguments // Prevent const rvalue arguments
template <typename T> template <typename T>

Loading…
Cancel
Save