summaryrefslogtreecommitdiff
path: root/hello/hello
blob: 75a47a019faca788a178548d5920d430500c97ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// file: hello/hello -*- C++ -*-

#pragma once

#include <string>

#include <format/format>

#include <hello/export>

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).
  //
  // Notice also that inline say() calls 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_formatted (format ("Hello", name));
  }
}