#include "hello.hpp" #include #include namespace hello { // unnamed namespace -> contains helper functions etc that are local to this file namespace { // helper function (not part of the class) void greet_(std::string_view name, std::ostream& out, std::ostream& err) { if (name.empty()) { err << "Invalid name!" << std::endl; return; } std::println("Hi {}, how are you?", name); } } // definition of the member function declared in the header void Greeter::greet(std::string_view name) { greet_(name, std::cout, std::cerr); } } // namespace hello