mirror of
				https://github.com/pocoproject/poco.git
				synced 2025-11-04 12:17:37 +01:00 
			
		
		
		
	#3196: std::forward for Poco::Optional ctor with rvalue
This commit is contained in:
		@@ -84,7 +84,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	Nullable(C&& value):
 | 
						Nullable(C&& value):
 | 
				
			||||||
		/// Creates a Nullable by moving the given value.
 | 
							/// Creates a Nullable by moving the given value.
 | 
				
			||||||
		_value(value),
 | 
							_value(std::forward<C>(value)),
 | 
				
			||||||
		_isNull(false),
 | 
							_isNull(false),
 | 
				
			||||||
		_null()
 | 
							_null()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -69,7 +69,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	Optional(C&& value):
 | 
						Optional(C&& value):
 | 
				
			||||||
		/// Creates a Optional by moving the given value.
 | 
							/// Creates a Optional by moving the given value.
 | 
				
			||||||
		_value(value),
 | 
							_value(std::forward<C>(value)),
 | 
				
			||||||
		_isSpecified(true)
 | 
							_isSpecified(true)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1034,7 +1034,7 @@ void CoreTest::testNullable()
 | 
				
			|||||||
	assertTrue (n2 != n1);
 | 
						assertTrue (n2 != n1);
 | 
				
			||||||
	assertTrue (n1 > n2);
 | 
						assertTrue (n1 > n2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	NullType nd;
 | 
						NullType nd{};
 | 
				
			||||||
	assertTrue (n1 != nd);
 | 
						assertTrue (n1 != nd);
 | 
				
			||||||
	assertTrue (nd != n1);
 | 
						assertTrue (nd != n1);
 | 
				
			||||||
	n1.clear();
 | 
						n1.clear();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user