View Single Post
  #5  
Old 08-28-2012, 09:24 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

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
Reply With Quote