2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-07 21:00:54 +00:00

Test empty function detection

This commit is contained in:
Jay Berkenbilt 2020-12-25 06:51:45 -05:00
parent 39bfa01307
commit 4cbe2abcc0

View File

@ -48,6 +48,12 @@ void do_functional()
}; };
assert(make_addr_lambda(6)(8) == 14); assert(make_addr_lambda(6)(8) == 14);
// nullptr and {} are empty functions
std::function<void()> f1 = {};
assert(! f1);
std::function<void()> f2 = nullptr;
assert(! f2);
} }
// Integer types, type traits // Integer types, type traits