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
The official policy on the use of C++11 features is at :ref:`Policy on use of C++11/14 language features <style-guide-cpp-cpp-11-14>`.
90
+
The C++11 standard and the C++14 improvements to it bring a number of useful language features that make the resulting code more expressive, easier to read, and safer.
91
+
92
+
We follow the official: International Standard ISO/IEC 14882:2014(E) – Programming Language C++, without any compiler specific extensions.
93
+
94
+
.. note::
95
+
96
+
Our minimum required compiler versions are:
97
+
98
+
* GCC 6.3.1 (Linux)
99
+
* Clang 800.0.42.1 (macOS)
100
+
101
+
these both have complete support for C++14, but in case of compiler bugs the actually allowed set
102
+
of C++14 features is the intersection of those supported by our compilers and the standard.
103
+
104
+
.. seealso::
105
+
106
+
- :ref:`pipelines:source-install-redhat-legacy` from the `LSST Science Pipelines <https://pipelines.lsst.io>`__ documentation.
107
+
But note that installation instructions for stack versions 14.0 and below refer to our older baseline compilers.
108
+
These are now superseded by the minimum required compiler versions listed above.
109
+
- :doc:`/services/lsst-dev` provides :ref:`instructions for using devtoolset-6 <lsst-dev-tools>` to obtain a more modern GCC on LSST cluster machines.
91
110
92
111
.. _style-guide-cpp-2-3:
93
112
@@ -1744,7 +1763,7 @@ This type of implicit conversion can result in incorrect and unintentional side
1744
1763
5-27a. Constructor calls SHOULD use C++98 syntax when possible.
While C++11 introduces a new syntax for "uniform initialization" using braces, C++ objects in LSST code should be initialized using syntax that is valid in C++98 whenever possible, with brace initialization used only when necessary, such as when initializing aggregates or containers that take ``std::initializer_list`` arguments.
1766
+
While a new syntax for "uniform initialization" using braces was introduced with C++11, C++ objects in LSST code should be initialized using syntax that is valid in C++98 whenever possible, with brace initialization used only when necessary, such as when initializing aggregates or containers that take ``std::initializer_list`` arguments.
1748
1767
1749
1768
In particular, default constructors should be called with no parentheses or braces. This avoids most occurrences of the `most-vexing parse problem <https://en.wikipedia.org/wiki/Most_vexing_parse>`_:
1750
1769
@@ -2626,23 +2645,6 @@ While it is not expected that we will bring the guts of all legacy code in line
2626
2645
.. [Google] Google C++ Style Guide, 2017. Available on-line at:
2627
2646
https://google.github.io/styleguide/cppguide.html
2628
2647
2629
-
.. _style-guide-cpp-cpp-11-14:
2630
-
2631
-
Appendix: Policy on using C++11/14 Features
2632
-
===========================================
2633
-
2634
-
The C++11 standard and the C++14 improvements to it bring a number of useful language features that make the resulting code more expressive, easier to read, and safer.
2635
-
They are becoming well-implemented and widespread.
2636
-
C++11/14 features supported by the default compiler provided with the oldest operating system distribution commonly used to install the LSST Stack, currently gcc 4.8.3, may be used at will in ``.cc`` and ``.h`` files.
2637
-
2638
-
.. seealso::
2639
-
2640
-
- :ref:`pipelines:source-install-redhat-legacy` from the `LSST Science Pipelines <https://pipelines.lsst.io>`__ documentation.
2641
-
- :doc:`/services/lsst-dev` provides :ref:`instructions for using devtoolset-3 <lsst-dev-tools>` to obtain a more modern GCC on LSST cluster machines.
2642
-
- C++11 compiler support matrix: http://wiki.apache.org/stdcxx/C++0xCompilerSupport.
2643
-
2644
-
C++11 uniform initialization syntax should in general *not* be preferred over C++98 construction syntax; see rule :ref:`5-27a <style-guide-cpp-5-27a>`.
Copy file name to clipboardExpand all lines: coding/using_boost.rst
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,16 +12,16 @@ Using Boost
12
12
13
13
A Boost library may be used only if:
14
14
15
-
1. the desired effect cannot be accomplished with a C++11 standard language feature, and
16
-
2. a C++ standard library equivalent is either unavailable or unusable with our minimum supported compiler version (i.e. ``gcc`` version 4.8).
15
+
1. the desired effect cannot be accomplished with a C++14 standard language feature, and
16
+
2. a C++ standard library equivalent is either unavailable or unusable with our minimum required compiler version (i.e. ``gcc`` version 6.3.1).
17
17
18
-
In particular, the following Boost libraries are no longer accepted as they have standard equivalents in gcc 4.8 and above:
18
+
In particular, the following Boost libraries are no longer accepted as they have standard equivalents in gcc 6.3.1 and above:
19
19
20
20
``array``
21
21
use ``<array>``
22
22
23
23
``bind``
24
-
prefer C++11 lambda functions instead, but use ``std::bind`` from ``<functional>`` if you must
24
+
prefer C++14 lambda functions instead, but use ``std::bind`` from ``<functional>`` if you must
25
25
26
26
``cstdint``
27
27
use ``<cstdint>``
@@ -30,7 +30,7 @@ In particular, the following Boost libraries are no longer accepted as they have
30
30
use ``<filesystem>``
31
31
32
32
``lambda``
33
-
use C++11 lambda functions
33
+
use C++14 lambda functions
34
34
35
35
``lexical_cast``
36
36
use ``std::to_string``, ``std::stoi``, ``std::stod`` etc.
@@ -51,7 +51,7 @@ In particular, the following Boost libraries are no longer accepted as they have
51
51
use ``std::shared_ptr`` and ``std::unique_ptr`` (and its array specialization) from ``<memory>`` instead of ``boost::shared_ptr``, ``boost::scoped_ptr`` and ``boost::scoped_array``
Copy file name to clipboardExpand all lines: teams/drp.rst
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,11 @@ When connecting to Tiger, you should connect to the head node ``tiger-sumire.pri
51
51
52
52
Tiger runs version 6.8 of `Springdale Linux <https://puias.math.ias.edu>`_ (a derivative of `RHEL <https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux>`_).
53
53
As such, the default toolchain is too old to work with the LSST stack.
54
-
You should therefore enable ``devtoolset-3`` before proceeding:
54
+
You should therefore enable ``devtoolset-6`` before proceeding:
55
55
56
56
.. prompt:: bash
57
57
58
-
scl enable devtoolset-3 bash
58
+
scl enable devtoolset-6 bash
59
59
60
60
A regularly-updated LSST “shared stack” is available in :file:`/tigress/HSC/LSST/stack_tiger/` (note that the name of the cluster is embedded in the path).
61
61
To get started, try:
@@ -74,8 +74,12 @@ Unlike Tiger, there is no head node reserved for HSC/LSST use.
74
74
Connect to ``perseus.princeton.edu``, and be especially considerate of other users before starting long-running jobs on the head node.
75
75
76
76
Tiger runs version 7.3 of `Springdale Linux <https://puias.math.ias.edu>`_ (a derivative of `RHEL <https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux>`_).
77
-
This provides a default toolchain which is appropriate for working with the LSST stack.
78
-
You should *not* enable ``devtoolset-3`` (or any other ``devtoolset``) when working with LSST code on this system.
77
+
As such, the default toolchain is too old to work with the LSST stack.
78
+
You should therefore enable ``devtoolset-6`` before proceeding:
79
+
80
+
.. prompt:: bash
81
+
82
+
scl enable devtoolset-6 bash
79
83
80
84
A regularly-updated LSST “shared stack” is available in :file:`/tigress/HSC/LSST/stack_perseus/` (note that the name of the cluster is embedded in the path).
0 commit comments