NSS/C++: Difference between revisions
< NSS
Jump to navigation
Jump to search
Franziskus (talk | contribs) (Created page with "With [https://searchfox.org/nss/source/lib/mozpkix MozPkix in NSS] C++ is officially allowed in NSS. This page collects a number of rules for C++ code in NSS. === Dependencie...") |
Franziskus (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
All C++ must be compilable with GCC 4.4.x. Note that this requirement changes depending on [https://access.redhat.com/solutions/19458 RHEL's default compiler]. | All C++ must be compilable with GCC 4.4.x. Note that this requirement changes depending on [https://access.redhat.com/solutions/19458 RHEL's default compiler]. | ||
Also note that GCC 4.4.x tests are limited on CI and mozpkix does not adhere to this requirement at this point. | Also note that GCC 4.4.x tests are limited on CI and mozpkix does not adhere to this requirement at this point. | ||
The list of supported C++11 features in GCC 4.4.x can be found [https://gcc.gnu.org/gcc-4.4/cxx0x_status.html here]. | The list of supported C++11 features in GCC 4.4.x can be found [https://gcc.gnu.org/gcc-4.4/cxx0x_status.html here] or [https://gcc.gnu.org/projects/cxx-status.html#cxx11 here]. | ||
==== Notable limitations ==== | |||
The following are notable C++ features that can NOT be used with GCC 4.4.x | |||
* <code>nullptr</code> is not available | |||
* Template aliases are not supported | |||
* The <code>explicit</code> operator | |||
* Range-based <code>for</code> loops |
Revision as of 14:29, 5 November 2018
With MozPkix in NSS C++ is officially allowed in NSS. This page collects a number of rules for C++ code in NSS.
Dependencies
The code MUST NOT depend on anything other than libstdc++
.
APIs
All public facing APIs must be C APIs, wrapping the C++ code.
Target Compiler
All C++ must be compilable with GCC 4.4.x. Note that this requirement changes depending on RHEL's default compiler. Also note that GCC 4.4.x tests are limited on CI and mozpkix does not adhere to this requirement at this point. The list of supported C++11 features in GCC 4.4.x can be found here or here.
Notable limitations
The following are notable C++ features that can NOT be used with GCC 4.4.x
nullptr
is not available- Template aliases are not supported
- The
explicit
operator - Range-based
for
loops