-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasses.hpp
More file actions
166 lines (125 loc) · 2.77 KB
/
Copy pathclasses.hpp
File metadata and controls
166 lines (125 loc) · 2.77 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/**
* clang-style definition for LAL
* Copyright (C) 2024 - 2026 Lluís Alemany Puig
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* Contact:
*
* Lluís Alemany Puig (lluis.alemany.puig@upc.edu)
* LQMC (Quantitative, Mathematical, and Computational Linguisitcs)
* CQL (Complexity and Quantitative Linguistics Lab)
* Jordi Girona St 1-3, Campus Nord UPC, 08034 Barcelona. CATALONIA, SPAIN
* Webpage: https://cqllab.upc.edu/people/lalemany/
*/
#pragma once
// C++ includes
#include <iostream>
class empty_class { };
class foo {
public:
foo() noexcept
: m_j(0),
m_i(9)
{ }
foo(const foo& f) noexcept = default;
foo(foo&& f) noexcept = default;
foo& operator= (const foo& f) noexcept = default;
foo& operator= (foo&& f) noexcept = delete;
~foo() noexcept = default;
foo& operator++ () noexcept
{
++m_j;
return *this;
}
[[nodiscard]] int operator[] ([[maybe_unused]] const int k) const noexcept
{
return m_i * k;
}
class nested_class_2 {
public:
protected:
private:
};
protected:
template <typename T>
void do_something([[maybe_unused]] const T& t) noexcept
{ }
/// Documentation of member @e m_j
int m_j;
/* comment */
class nested_class_1 {
public:
protected:
private:
};
private:
/// Documentation of member @e m_i
int m_i;
class nested_class_3 {
public:
protected:
private:
};
[[nodiscard]] static inline constexpr int
function_with_a_long_name() noexcept
{
return 1;
}
};
class foo_2 {
public:
foo_2(
int param1,
int param2,
[[maybe_unused]] int param3,
[[maybe_unused]] int param4
) noexcept
: m_j(param1),
m_i(param2)
{
std::cout << m_i << '\n';
}
void do_something(
int param1,
int param2,
[[maybe_unused]] int param3,
[[maybe_unused]] int param4
) const noexcept
{
std::cout << param1 + param2 * m_i << '\n';
}
class nested_class_2 {
public:
protected:
private:
};
protected:
/// Documentation of member @e m_j
int m_j;
/* comment */
class nested_class_1 {
public:
protected:
private:
};
private:
/// Documentation of member @e m_i
int m_i;
class nested_class_3 {
public:
protected:
private:
};
};