Difference between revisions of "Coding Conventions"

Jump to navigation Jump to search
No change in size ,  07:33, 3 April 2022
m
We now use C++11 everywhere
m (Text replacement - "</source>" to "</syntaxhighlight>")
m (We now use C++11 everywhere)
Line 9: Line 9:


== Language features ==
== Language features ==
ScummVM is written in a subset of C++98. Due to limitations of the C++ run-times on various platforms, the following features cannot currently be used:
ScummVM is written in a subset of C++11. Due to limitations of the C++ run-times on various platforms, the following features cannot currently be used:
* C++ exceptions (throw/catch): Not all C++ compilers support these correctly (esp. on embedded systems), and exception support incurs a noticeable overhead in binary size.
* C++ exceptions (throw/catch): Not all C++ compilers support these correctly (esp. on embedded systems), and exception support incurs a noticeable overhead in binary size.
* Global C++ objects: Their constructors / destructors will not be called on certain targets, causing all kinds of bad problems and requiring ugly workarounds. (The GCC option -Wglobal-constructors helps finding code doing this.)
* Global C++ objects: Their constructors / destructors will not be called on certain targets, causing all kinds of bad problems and requiring ugly workarounds. (The GCC option -Wglobal-constructors helps finding code doing this.)

Navigation menu