[cfe-dev] Reaching the end of a value-returning function in C++

Sean Silva silvas at purdue.edu
Fri Oct 12 21:44:06 PDT 2012


>> template <class _CharT, class _Traits>
>> inline _LIBCPP_INLINE_VISIBILITY
>> basic_filebuf<_CharT, _Traits>&
>> basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs)
>> {
>>     close();
>>     swap(__rhs);
>> }
>
> Notice the absence of a "return *this".

Shouldn't -Wreturn-type have caught this?

-- Sean Silva



More information about the cfe-dev mailing list