Implement ::as_rvalue

This commit is contained in:
Eladash 2020-04-11 21:34:31 +03:00 committed by Ivan
parent e407018bb5
commit 141d62fbf9
4 changed files with 23 additions and 5 deletions

View file

@ -167,6 +167,24 @@ using get_uint_t = typename get_int_impl<N>::utype;
template <std::size_t N>
using get_sint_t = typename get_int_impl<N>::stype;
template <typename T>
T as_rvalue(T&& obj)
{
return obj;
}
template <typename T>
T as_rvalue(const T& obj)
{
return obj;
}
template <typename T>
T as_rvalue(const volatile T& obj)
{
return obj;
}
// Formatting helper, type-specific preprocessing for improving safety and functionality
template <typename T, typename = void>
struct fmt_unveil;