From bffe85ae4c01f126c47ab7ea7b220b91d7c65dac Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 20 Jul 2017 08:52:55 +0200 Subject: Make slightly more interesting --- libhello/libhello/buildfile | 2 +- libhello/libhello/hello.cxx | 2 +- libhello/libhello/hello.hxx | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'libhello/libhello') diff --git a/libhello/libhello/buildfile b/libhello/libhello/buildfile index e65edde..0f84ca6 100644 --- a/libhello/libhello/buildfile +++ b/libhello/libhello/buildfile @@ -23,4 +23,4 @@ lib{hello}: cxx.export.libs = $int_libs # Install into the libhello/ subdirectory of, say, /usr/include/. # -install.include = $install.include/libhello/ +install.include = $install.include/$project/ diff --git a/libhello/libhello/hello.cxx b/libhello/libhello/hello.cxx index f7e3b7f..ee5c555 100644 --- a/libhello/libhello/hello.cxx +++ b/libhello/libhello/hello.cxx @@ -11,6 +11,6 @@ namespace hello void say_formatted (const string& m) { - print (m); + print::to_stdout (m); } } diff --git a/libhello/libhello/hello.hxx b/libhello/libhello/hello.hxx index ccc43c2..d9e41d9 100644 --- a/libhello/libhello/hello.hxx +++ b/libhello/libhello/hello.hxx @@ -11,18 +11,19 @@ namespace hello { // If you compare this interface to version 1.0, then you will notice that - // while it is API/source-compatible (the signature of say() is unchanged) - // it is not ABI/binary-compatible (say() is now inline). + // while it is API/source-compatible (the call via the old signature of + // say() is still valid) it is not ABI/binary-compatible (say() now has an + // extra argument and is inline). // - // Notice also that inline say() calls format() which means libformat is an - // interface dependency of libhello. + // Notice also that inline say() now uses a type and calls a function from + // format which means libformat is an "interface dependency" of libhello. LIBHELLO_EXPORT void say_formatted (const std::string& message); inline void - say (const std::string& name) + say (const std::string& name, format::volume v = format::volume::normal) { - say_formatted (format ("Hello", name)); + say_formatted (format::message ("Hello", name, v)); } } -- cgit v1.1