From fbffe2367e96df8d6a423c311f0112b22643a9c1 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. --- src/beast/beast/utility/tests/weak_fn.test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/beast/beast/utility/tests/weak_fn.test.cpp b/src/beast/beast/utility/tests/weak_fn.test.cpp index 7137fc978..6d551ab78 100644 --- a/src/beast/beast/utility/tests/weak_fn.test.cpp +++ b/src/beast/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&)