Lines Matching +full:zephyr +full:- +full:bugs +full:-

6 C++ is a general-purpose object-oriented programming language that is based on
12 Zephyr supports applications written in both C and C++. However, to use C++ in
13 an application you must configure Zephyr to include C++ support by selecting
17 and the included compiler must be supported by the Zephyr build system. The
19 is supported by Zephyr, and the features and their availability documented
20 here assume the use of the Zephyr SDK.
23 compiler flags passed) for Zephyr apps is C++11. Other standards are
26 tested in Zephyr is C++98.
36 has to be selected. Zephyr ignores the return value from main, so applications
45 Zephyr currently provides only a subset of C++ functionality. The following
49 * OS-specific C++ standard library classes (e.g. ``std::thread``,
72 Zephyr Minimal C++ Library
75 Zephyr minimal C++ library (:file:`lib/cpp/minimal`) provides a minimal subset
86 the applications that implement their own (non-standard) class library and do
99 Zephyr does not include any C++ standard library implementation in source code
101 pre-built C++ standard library included in the C++ compiler toolchain.
103 To enable C++ standard library, select an applicable toolchain-specific C++
114 The following C++ standard libraries are supported by Zephyr:
119 A Zephyr subsystem that requires the features from the full C++ standard
137 different compilers. Compilers can have bugs and these may need
139 limited number of toolchains. Zephyr does not.
141 These compatibility issues affect header files dis-proportionally. Not
145 headers organization`_ that is typical in real-world projects. So, header
148 Adding more constraints, the Zephyr project has demanding policies
154 practices" and lessons learned in a Zephyr-specific context. While a lot
155 of the information here is not Zephyr-specific, this section is not a
160 -------
162 Fortunately, the Zephyr project has an extensive test and CI
167 quickly over a range of ``-std`` parameters: ``-std=c++98``,
168 ``-std=c++11``, etc.
173 -----------------------
182 error-prone, more readable and more flexible. On the other hand, C99
194 Interestingly, the new restrictions in C++20 can cause ``gcc -std=c++20``
196 ``gcc -std=c++17``. For example, ``gcc -std=c++17`` and older allow the
197 C-style mix of initializers and bare expressions. This fails to compile
198 with using ``gcc -std=c++20`` *with the same GCC version*.
201 toolchains and standards, designated initializers in Zephyr header files
202 should follow all C++20 rules and restrictions. Non-designated, pre-C99
210 unspecified in C99! It is the (expected) left-to-right order in
215 ----------------
228 - Do *not* enclose *designated* initializers with braces. This is
232 - Do enclose *bare* expressions with braces. This is required by C.
235 does allow omitting most braces in initializer expressions - but not
239 Some pre-C11 GCC versions support some form of anonymous unions. They
242 with an ``#ifdef __STDC_VERSION__`` as demonstrated in Zephyr commit
244 <https://github.com/zephyrproject-rtos/zephyr/commit/c15f029a7108>`_ and
252 https://github.com/zephyrproject-rtos/zephyr/issues/41543
254 https://gcc.gnu.org/pipermail/gcc-patches/2017-November/487584.html