From 15c1055ff4a60fa6a5fd102ee98a9baada5dce8a Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sun, 9 Nov 2014 20:27:05 -0800 Subject: [PATCH] Fix weak_fn unit test. --- beast/utility/tests/weak_fn.test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beast/utility/tests/weak_fn.test.cpp b/beast/utility/tests/weak_fn.test.cpp index 7137fc978..6d551ab78 100644 --- a/beast/utility/tests/weak_fn.test.cpp +++ b/beast/utility/tests/weak_fn.test.cpp @@ -108,9 +108,10 @@ public: auto p = std::make_shared(called); try { - std::bind(weak_fn(&T::fis, p, throw_if_invalid<>()), - 1, std::placeholders::_1)("foo"); + auto call = std::bind(weak_fn(&T::fis, p, throw_if_invalid<>()), + 1, std::placeholders::_1); p.reset(); + call("foo"); fail(); } catch(std::bad_weak_ptr const&)