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