diff --git a/test/redirect.h b/test/redirect.h index f05fe182942..0518a3f81a5 100644 --- a/test/redirect.h +++ b/test/redirect.h @@ -117,7 +117,7 @@ class SuppressOutput { class RedirectInput { public: - RedirectInput(const std::string &input) : _in(input) { + explicit RedirectInput(const std::string &input) : _in(input) { _oldCin = std::cin.rdbuf(); // back up cin's streambuf std::cin.rdbuf(_in.rdbuf()); // assign streambuf to cin }