tap: make test function parameter const

This commit is contained in:
Danny Robson 2016-05-12 17:28:33 +10:00
parent d4b951b4db
commit 452c5511a4
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ namespace util { namespace TAP {
void expect (bool, const std::string &fmt, Args&&...);
template <typename ...Args>
void expect (std::function<bool(Args...)>, Args&&..., const std::string& msg);
void expect (const std::function<bool(Args...)>&, Args&&..., const std::string& msg);
//---------------------------------------------------------------------
template <typename T, typename U, typename ...Args>

View File

@ -45,7 +45,7 @@ util::TAP::logger::expect (bool test, const std::string &fmt, Args&&... args)
//-----------------------------------------------------------------------------
template <typename... Args>
void
util::TAP::logger::expect (std::function<bool(Args...)> test, Args&&... args, const std::string &msg)
util::TAP::logger::expect (const std::function<bool(Args...)> &test, Args&&... args, const std::string &msg)
{
expect (test (std::forward<Args> (args)...), msg);
}