/ src / examples / cxx / hello.cpp
hello.cpp
 1  // examples/cxx/hello.cpp
 2  // Simple C++23 test to verify toolchain.
 3  
 4  #include <cstdio>
 5  #include <string_view>
 6  
 7  namespace straylight::examples {
 8  
 9  constexpr std::string_view greeting = "straylight toolchain operational";
10  
11  auto main_impl() -> int {
12    std::printf("%.*s\n", static_cast<int>(greeting.size()), greeting.data());
13    return 0;
14  }
15  
16  } // namespace straylight::examples
17  
18  auto main() -> int {
19    return straylight::examples::main_impl();
20  }