3 ms·
std::move's implementation not quite as elegant, though (this is from the GCC source): template<typename _Tp> constexpr typename std::remove_reference<_T
by codeflo 7y ago
std::move's implementation not quite as elegant, though (this is from the GCC source):
template<typename _Tp>
constexpr typename std::remove_reference<_Tp>::type&&
move(_Tp&& __t) noexcept
{ return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
- saagarjha 7y agoIt’s a bit ugly because the standard library functions are replete with underscores, and of course it isn’t empty. But I still think it’s quite surprising, as most people would think it actually does some sort of semantic “move”.
- saghm 7y ago> It’s a bit ugly because the standard library functions are replete with underscores, and of course it isn’t empty. I'll be honest, neither of those are my top issue with that in terms of why I think it's ugly.