Calculator  Step 4
calc_error.cpp
Go to the documentation of this file.
1 #include <sstream>
2 
3 #include "calc_error.hpp"
4 
5 std::string function_error::msg(std::string const& name, std::size_t expected, std::size_t actual)
6 {
7  std::ostringstream stream{};
8  stream << "wrong number of arguments in call to " + name + "(), expected " << expected << ", got " << actual;
9  return stream.str();
10 }
std::string msg(std::string const &name, std::size_t expected, std::size_t actual)
Definition: calc_error.cpp:5