18 lines
287 B
C++
18 lines
287 B
C++
|
#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;
|
||
|
}
|
||
|
}
|