MCPcopy Create free account
hub / github.com/SheafificationOfG/based-cpp / greet

Function greet

hello_world.cpp:20–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19template <Language language = English>
20static constexpr auto greet(auto name) noexcept {
21 if constexpr (language == English) {
22 return block_(
23 str::puts(str::literal("Hello, ")),
24 str::puts(name),
25 str::puts(str::literal("!\n"))
26 );
27 } else if constexpr (language == Français) {
28 return block_(
29 str::puts(str::literal("Bonjour, ")),
30 str::puts(name),
31 str::puts(str::literal(" !\n"))
32 );
33 } else if constexpr (language == 中文) {
34 return block_(
35 str::puts(name),
36 str::puts(str::literal("好。\n"))
37 );
38 }
39}
40
41volatile auto run = main<{
42 var_(IS_WHITESPACE) = fn_(CH)(

Callers

nothing calls this directly

Calls 3

block_Function · 0.85
putsFunction · 0.85
literalFunction · 0.85

Tested by

no test coverage detected