Language: C++

module app;

import core.bitop;

import std.algorithm;
import std.array;
import std.bigint;
import std.conv;
import std.stdio;
import std.string;

struct Input
{
	string s;
}

void parseInput(T)(out Input input, T file)
{
    with (file) with (input)
    {
        s = readln().strip();
    }
}

auto main2(Input* input)
{
	switch (input.s)
	{
		case "Sunny" : return "Cloudy";
		case "Cloudy" : return "Rainy";
		case "Rainy" : return "Sunny";
			default: assert(0);
	}
}


void main()
{
    Input input = void;
    parseInput(input, stdin);
    auto result = main2(&input);
    writeln(result);
}

void parseExample(out Input input, string example)
{
    struct Adapter
    {
        import std.string;
        string[] _lines;
        this(string input) { _lines = input.splitLines(); }

        string readln()
        {
            auto line = _lines[0];
            _lines = _lines[1..$];
            return line;
        }
/+
        uint readf(Data...)(scope const(char)[] format, auto ref Data data)
        {
            import std.format;
            return formattedRead(readln(), format, data);
        }+/
    }
    Adapter a = Adapter(example);
    parseInput(input, a);
}


Compiler output:
a.cc:56:29: error: too many decimal points in number
   56 |             _lines = _lines[1..$];
      |                             ^~~~
a.cc:1:1: error: 'module' does not name a type
    1 | module app;
      | ^~~~~~
a.cc:1:1: note: C++20 'module' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import core.bitop;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.algorithm;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import std.array;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import std.bigint;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import std.conv;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
    9 | import std.stdio;
      | ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
   10 | import std.string;
      | ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:9: error: 'string' does not name a type
   14 |         string s;
      |         ^~~~~~
a.cc:15:2: error: expected ';' after struct definition
   15 | }
      |  ^
      |  ;
a.cc:17:6: error: variable or field 'parseInput' declared void
   17 | void parseInput(T)(out Input input, T file)
      |      ^~~~~~~~~~
a.cc:17:17: error: 'T' was not declared in this scope
   17 | void parseInput(T)(out Input input, T file)
      |                 ^
a.cc: In function 'auto main2(Input*)':
a.cc:27:23: error: request for member 's' in 'input', which is of pointer type 'Input*' (maybe you meant to use '->' ?)
   27 |         switch (input.s)
      |                       ^
a.cc:32:34: error: 'assert' was not declared in this scope
   32 |                         default: assert(0);
      |                                  ^~~~~~
a.cc:1:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
  +++ |+#include <cassert>
    1 | module app;
a.cc: At global scope:
a.cc:37:1: error: '::main' must return 'int'
   37 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:39:19: error: expected primary-expression before 'void'
   39 |     Input input = void;
      |                   ^~~~
a.cc:40:23: error: 'stdin' was not declared in this scope
   40 |     parseInput(input, stdin);
      |                       ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | module app;
a.cc:40:5: error: 'parseInput' was not declared in this scope
   40 |     parseInput(input, stdin);
      |     ^~~~~~~~~~
a.cc:42:5: error: 'writeln' was not declared in this scope
   42 |     writeln(result);
      |     ^~~~~~~
a.cc: At global scope:
a.cc:45:6: error: variable or field 'parseExample' declared void
   45 | void parseExample(out Input input, string example)
      |      ^~~~~~~~~~~~
a.cc:45:19: error: 'out' was not declared in this scope
   45 | void parseExample(out Input input, string example)
      |                   ^~~
a.cc:45:36: error: 'string' was not declared in this scope
   45 | void parseExample(out Input input, string example)
      |                                    ^~~~~~
a.cc: In function 'auto main2(Input*)':
a.cc:34:1: warning: control reaches end of non-void function [-Wreturn-type]
   34 | }
      | ^