Language And Standards Support
It might be obvious to abstract from APIs to support multiple implementations, for example supporting DirectX and OpenGL would mean your render sub system hides the details of the API that is in use, but less obvious is language and standards support.
Newer versions of the C++ standard include defining language features and standard library features that programmers should be able to expect to be available, however if you want to target exotic platforms not all features will be available.
Why wouldn't language features, such as auto, be available?
If a platform's toolchain is too old language features aren't necessarily going to be available. We've dealt with this by restricting the language version that we officially support (we're still testing but it should officially be C++11 soon). We can also make it appear as though we have more keyword support than we do, for example #define override allows us to use override where you would normally use it even if the keyword doesn't exist, however it doesn't provide any compile checks and doesn't stop you using it in the wrong place.
Why can't I just use std::thread, it is standard after all, isn't it?
Yes, it is a standard, but not all standard library features are available with all tool chains. Threading is an easy example because I happened to be attempting to do something with it recently. Threading support on the Wii is provided through libogc and std::thread,std::mutex etc are not available. Echo provides basic abstractions threading to solve this problem. The implementation isn't as comprehensive as what is available in the standard but if a feature you need is missing then please request or add it yourself.
So basically, this means that we're not on the cutting edge of C++ language support since toolchains aren't always up to date.
This page is designed to give you an idea of what is available. There are three tables, language version support, standard library features, and boost support. Please update this document if you find an error.
Status of GCC CXX lanauge support
Language version support (not std library) vs compiler versions
Target | Compiler | Language |
Linux | GCC 4.8.2 | C++11 |
Windows | GCC 4.8.2 (mingw32) | C++11 |
OSX | GCC 4.8.2 | C++11 |
Android 2.3 api-9 | GCC 4.8 | most of C++11 |
Android 4.4 api-19 | TBD | Probably C++11 |
iOS | GCC 4.8.2 | C++11 |
Wii | GCC 4.8.2 | C++11 |
Cells with "?" need to be determined. This isn't a complete list.
Standard library features (std)
Linux | Android 2.3 | Wii | Windows | |
STL | yes | yes | yes | yes |
Threading | yes | ? | no | ? |
Tuples | ? | ? | ? | ? |
Hash tables | ? | ? | ? | ? |
Regular expressions | ? | ? | ? | ? |
Smart pointers | yes | yes | yes | yes |
Wrapper ref | ? | ? | ? | ? |
Random numbers | ? | ? | ? | ? |
Type traits | ? | ? | ? | ? |
... | ||||
Cells with "?" need to be determined. This isn't a complete list, since a lot of boost libraries are header only and don't depend on external libraries most libraries will work.
Boost library support
Linux | Android 2.3 | Wii | Windows | |
bind | yes | yes | yes | yes |
chrono | yes | yes | yes | yes |
DateTime | yes | yes | ? | yes |
function | yes | yes | yes | yes |
fusion | yes | yes | yes | yes |
filesystem | yes | no | no | yes |
Smart pointers | yes | yes | yes | yes |
For each pointers | yes | yes | yes | yes |
lexical cast | yes | yes | yes | yes |
optional | yes | yes | yes | yes |
regex | yes | yes | yes | yes |
thread | yes | ? | no | ? |
timer | yes | yes | yes | yes |
... | ||||
- Last Author
- 0xseantasker
- Last Edited
- Jan 22 2020, 10:51 PM