forked from boostorg/beast
Add handler_ptr::has_value
This function returns `true` if the container holds a managed object. Resolves: #1079 Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
committed by
Vinnie Falco
parent
344d957f42
commit
86555b90ae
@@ -102,7 +102,9 @@ public:
|
||||
{
|
||||
handler_ptr<T, handler> p{handler{}};
|
||||
bool b = false;
|
||||
BEAST_EXPECT(p.has_value());
|
||||
p.invoke(std::ref(b));
|
||||
BEAST_EXPECT(! p.has_value());
|
||||
BEAST_EXPECT(b);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user