You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/cpp/cpp_vent.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ In things entirely written in modern C++ (loosely C++11 and above, but C++14 and
60
60
61
61
Use `smart pointers <https://en.cppreference.com/w/cpp/memory>`_. In general, `std::shared_ptr <https://en.cppreference.com/w/cpp/memory/shared_ptr>`_ and, if needed, `std::unique_ptr <https://en.cppreference.com/w/cpp/memory/unique_ptr>`_.
62
62
63
-
If only using smart pointers you still manage to get a segmentation fault, then hats off to you.
63
+
If only using smart pointers, you still manage to get a segmentation fault, then hats off to you.
64
64
65
65
But I can get segfaults with ``std::vector``
66
66
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -69,7 +69,7 @@ As a successor of C, the standard library in C++ kept some of its predecessor's
69
69
70
70
For example, with trigonometric functions in C++, the error handling is `C-like <https://en.cppreference.com/w/cpp/numeric/math/math_errhandling>`_
71
71
72
-
For instance getting the ``acos`` of 1.1, which is invalid, will fail silently in C++. We must check if the output is ``NaN``, e.g. with
72
+
For instance, getting the ``acos`` of 1.1, which is invalid, will fail silently in C++. We must check if the output is ``NaN``, e.g., with
73
73
74
74
.. code-block:: cpp
75
75
@@ -82,7 +82,7 @@ For instance getting the ``acos`` of 1.1, which is invalid, will fail silently i
82
82
std::cout << std::isnan(a) ? "the output was invalid but no exception was thrown " : a << std::endl;
83
83
}
84
84
85
-
the same applies if we try to access beyond a vector's limits with the good and old ``operator[]``.
85
+
The same applies if we try to access beyond a vector's limits with the good and old ``operator[]``.
86
86
Instead of doing that, use the method ``.at()``, which `checks the bounds <https://en.cppreference.com/w/cpp/container/vector/at>`_.
87
87
88
88
.. code-block:: cpp
@@ -111,7 +111,7 @@ As a conclusion, find the correct function/method or throw an exception yourself
111
111
But C++ makes too many copies of objects: The sonata of "I don't know `perfect forwarding <https://en.cppreference.com/w/cpp/utility/forward>`_"
I see this claim all the time and it has many `skill-issue <https://knowyourmeme.com/memes/skill-issue-simply-a-difference-in-skill>`_\ -related causes, but basically, it shows up more frequently in the constructors of ``std::vector`` and ``std::shared_ptr``.
114
+
I see this claim all the time, and it has many `skill-issue <https://knowyourmeme.com/memes/skill-issue-simply-a-difference-in-skill>`_\ -related causes, but basically, it shows up more frequently in the constructors of ``std::vector`` and ``std::shared_ptr``.
Here is the description of the packages we are installing. You can notice that the packages are being used in the commands to add the :program:`Gazebo Harmonic` packages to our :program:`apt` sources.
`lsb-release`_ The lsb_release command is a simple tool to help identify the Linux distribution being used and its compliance with the Linux Standard Base
17
+
gnupg_ :program:`GnuPG` is an universal crypto engine which can be used directly from a command line prompt, from shell scripts, or from other programs.
Copy file name to clipboardExpand all lines: docs/source/preamble/python/editing_python_source_pycharm.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Then, you can run :program:`PyCharm` with
47
47
48
48
pycharm_ros2
49
49
50
-
.. info::
50
+
.. important::
51
51
We use :program:`pycharm_ros2` instead of :program:`pycharm` on purpose. This prevents our alias from misbehaving if you have another version of :program:`PyCharm` installed.
0 commit comments