Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
c0e4af51
Commit
c0e4af51
authored
Jul 29, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add breaking rules to style guide
parent
af851928
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
HACKING.md
HACKING.md
+41
-2
No files found.
HACKING.md
View file @
c0e4af51
This document specifies the coding style for the C++ Actor Framework.
The style is based on the
[
Google C++ Style Guide
](
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
)
.
The style is loosely based on the
[
Google C++ Style Guide
](
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
)
and the coding conventions used by the STL.
Example for the Impatient
=========================
...
...
@@ -246,6 +247,44 @@ Headers
-
Use
`inline`
for small functions (rule of thumb: 10 lines or less).
Breaking Statements
===================
-
Break constructor initializers after the comma, use four spaces for
indentation, and place each initializer on its own line (unless you don't
need to break at all):
```
cpp
my_class
::
my_class
()
:
my_base_class
(
some_function
()),
m_greeting
(
"Hello there! This is my_class!"
),
m_some_bool_flag
(
false
)
{
// ok
}
other_class
::
other_class
()
:
m_name
(
"tommy"
),
m_buddy
(
"michael"
)
{
// ok
}
```
-
Break function arguments after the comma for both declaration and invocation:
```
cpp
intptr_t
channel
::
compare
(
const
abstract_channel
*
lhs
,
const
abstract_channel
*
rhs
)
{
// ...
}
```
-
Break before tenary operators and before binary operators:
```
cpp
if
(
today_is_a_sunny_day
()
&&
it_is_not_too_hot_to_go_swimming
())
{
// ...
}
```
Template Metaprogramming
========================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment