aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libtests/cxx11.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libtests/cxx11.cc b/libtests/cxx11.cc
index ba4525ed..bec86cec 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<void()> f1 = {};
+ assert(! f1);
+ std::function<void()> f2 = nullptr;
+ assert(! f2);
}
// Integer types, type traits