copy/libcopy-test/copy-test.cxx

18 lines
287 B
C++
Raw Permalink Normal View History

2024-09-01 23:43:44 +00:00
#include <libcopy-test/copy-test.hxx>
#include <ostream>
#include <stdexcept>
using namespace std;
namespace copy_test
{
void say_hello (ostream& o, const string& n)
{
if (n.empty ())
throw invalid_argument ("empty name");
o << "Hello, " << n << '!' << endl;
}
}