diff --git a/tap.hpp b/tap.hpp index 4ef921f0..01bc1049 100644 --- a/tap.hpp +++ b/tap.hpp @@ -45,34 +45,34 @@ namespace util { namespace TAP { //--------------------------------------------------------------------- template - void expect_eq (const T&, const U&, const std::string &fmt, Args&...); + void expect_eq (const T&, const U&, const std::string &fmt, Args&&...); template - void expect_neq (const T&, const U&, const std::string &fmt, Args&...); + void expect_neq (const T&, const U&, const std::string &fmt, Args&&...); //--------------------------------------------------------------------- template - void expect_gt (const T&, const U&, const std::string &fmt, Args&...); + void expect_gt (const T&, const U&, const std::string &fmt, Args&&...); template - void expect_ge (const T&, const U&, const std::string &fmt, Args&...); + void expect_ge (const T&, const U&, const std::string &fmt, Args&&...); template - void expect_lt (const T&, const U&, const std::string &fmt, Args&...); + void expect_lt (const T&, const U&, const std::string &fmt, Args&&...); template - void expect_le (const T&, const U&, const std::string &fmt, Args&...); + void expect_le (const T&, const U&, const std::string &fmt, Args&&...); //--------------------------------------------------------------------- template - void expect_nan (const T&, const std::string &fmt, Args&...); + void expect_nan (const T&, const std::string &fmt, Args&&...); //--------------------------------------------------------------------- template - void expect_nothrow (T&&, const std::string &fmt, Args&...); + void expect_nothrow (T&&, const std::string &fmt, Args&&...); template - void expect_throw (T&&, const std::string &fmt, Args&...); + void expect_throw (T&&, const std::string &fmt, Args&&...); //--------------------------------------------------------------------- void skip (const std::string &msg); diff --git a/tap.ipp b/tap.ipp index 94503739..5471eb30 100644 --- a/tap.ipp +++ b/tap.ipp @@ -54,7 +54,7 @@ util::TAP::logger::expect (std::function test, Args&&... args, co //----------------------------------------------------------------------------- template void -util::TAP::logger::expect_eq (const T&a, const U &b, const std::string &fmt, Args&... args) +util::TAP::logger::expect_eq (const T&a, const U &b, const std::string &fmt, Args&&... args) { static const std::function TEST = [] (const T &t, const U &u) -> bool { return almost_equal (t, u); @@ -67,7 +67,7 @@ util::TAP::logger::expect_eq (const T&a, const U &b, const std::string &fmt, Arg //----------------------------------------------------------------------------- template void -util::TAP::logger::expect_neq (const T&a, const U &b, const std::string &fmt, Args&... args) +util::TAP::logger::expect_neq (const T&a, const U &b, const std::string &fmt, Args&&... args) { static const std::function TEST = [] (const T &t, const U &u) -> bool { return !almost_equal (t, u); @@ -84,7 +84,7 @@ void \ util::TAP::logger::expect_ ## SUFFIX (const T &a, \ const U &b, \ const std::string &fmt, \ - Args&... args) \ + Args&&... args) \ { \ static const std::function< \ bool(const T&,const U&) \ @@ -111,7 +111,7 @@ TAP_TEST(le, <=) //----------------------------------------------------------------------------- template void -util::TAP::logger::expect_nan (const T &t, const std::string &fmt, Args&... args) +util::TAP::logger::expect_nan (const T &t, const std::string &fmt, Args&&... args) { bool(*func)(T) = std::isnan; expect ( @@ -125,7 +125,7 @@ util::TAP::logger::expect_nan (const T &t, const std::string &fmt, Args&... args //----------------------------------------------------------------------------- template void -util::TAP::logger::expect_nothrow (T &&t, const std::string &fmt, Args&... args) +util::TAP::logger::expect_nothrow (T &&t, const std::string &fmt, Args&&... args) { bool success = true; @@ -142,7 +142,7 @@ util::TAP::logger::expect_nothrow (T &&t, const std::string &fmt, Args&... args) //----------------------------------------------------------------------------- template void -util::TAP::logger::expect_throw (T &&t, const std::string &fmt, Args&... args) +util::TAP::logger::expect_throw (T &&t, const std::string &fmt, Args&&... args) { bool success = false;