Unnamed repository; edit this file 'description' to name the repository.
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
std::vector<std::string>
fn_with_many_parameters(int parm1, long parm2, float parm3, double parm4,
                        char* parm5, bool parm6);

std::vector<std::string>
fn_with_many_parameters(int parm1, long parm2, float parm3, double parm4,
                        char* parm5, bool parm6) {
  auto lambda = []() {
    return 0;
  };
  auto lambda_with_a_really_long_name_that_uses_a_whole_line
    = [](int some_more_aligned_parameters,
         std::string parm2) {
      do_smth();
    };
  if (brace_on_same_line) {
    do_smth();
  } else if (brace_on_next_line)
  {
    do_smth();
  } else if (another_condition) {
    do_smth();
  }
  else {
    do_smth();
  }
  if (inline_if_statement)
    do_smth();
  if (another_inline_if_statement)
    return [](int parm1, char* parm2) {
      this_is_a_really_pointless_lambda();
    };

  switch (var) {
  case true:
    return -1;
  case false:
    return 42;
  }
}

class MyClass : public MyBaseClass {
public:
  MyClass();
  void public_fn();
private:
  super_secret_private_fn();
}

namespace geometry {

  template <typename T>
  class Point {
  public:
    Point(T x, T y) : x_(x), y_(y) {}

    T sum() const {
      return x_ + y_;
    }

  private:
    T x_;
    T y_;
  };

  enum class Color {
    Red,
    Green,
    Blue,
  };

  void iterate(const std::vector<int> &items) {
    for (const auto &item : items) {
      try {
        process(item);
      } catch (const std::exception &e) {
        handle(e);
      }
    }
  }

} // namespace geometry

const char *raw = R"(
unindented
  indented
)";