Looks like there's a warning at level 4 in Visual Studio 2008, but not at level 3.
Code:
#include <list>
typedef std::list<int> IntList;
IntList DoSomething()
{
IntList RetVal;
return RetVal;
}
int main()
{
IntList List;
List.merge( DoSomething() );
return 0;
}
Code:
warning C4239: nonstandard extension used : 'argument' : conversion from 'IntList' to 'std::list<_Ty> &'
with
[
_Ty=int
]
A non-const reference may only be bound to an lvalue