diff --git a/libtests/cxx11.cc b/libtests/cxx11.cc index ba4525e..bec86ce 100644 --- a/libtests/cxx11.cc +++ b/libtests/cxx11.cc @@ -48,6 +48,12 @@ void do_functional() }; assert(make_addr_lambda(6)(8) == 14); + + // nullptr and {} are empty functions + std::function f1 = {}; + assert(! f1); + std::function f2 = nullptr; + assert(! f2); } // Integer types, type traits