From 49261d3c921a16bffd491555d3a41ea1e5410d13 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 May 2018 14:29:05 +0200 Subject: Regenerate libhello using bdep-new --- libhello/libhello/hello.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'libhello/libhello/hello.cxx') diff --git a/libhello/libhello/hello.cxx b/libhello/libhello/hello.cxx index 677815d..4fbd917 100644 --- a/libhello/libhello/hello.cxx +++ b/libhello/libhello/hello.cxx @@ -1,16 +1,17 @@ -// file: libhello/hello.cxx -*- C++ -*- - #include -#include +#include +#include using namespace std; namespace hello { - void - say (const string& n) + void say_hello (ostream& o, const string& n) { - cout << "Hello, " << n << '!' << endl; + if (n.empty ()) + throw invalid_argument ("empty name"); + + o << "Hello, " << n << '!' << endl; } } -- cgit v1.1