c++iosobjective-ccross-platform

Any limitations using C++ STL for iOS development?


My purpose is to reuse some C++ STL implementation for iOS development with static library.

As we know, iOS devices are based on ARM6/7 family,which is different with *86 family for some compiler options.

For mobile development, we prefer to reuse some C++ codes across different platforms,such as iOS, Android, and even for the PC back end.

So question here to know some issues or limitations for this purpose.

Thanks


C++ STL just refer some popular version,I do not want to cover all STL libs, I just want to know some popular issues for this case. Thanks for pointing any out.


Solution

  • The main purpose of using standardized tools is to achieve portability. As long as you use the library as intended, without relying on behavior outside the standard, there should not be any issues moving it to any platform with a good C++ implementation.

    The Standard Library implementation on iOS is the same as the one on Mac OS. There should be no difference.

    ARM vs x86 should make no difference whatsoever. The part of the C++ Standard Library called the STL consists entirely of templates, hence "Standard Template Library." Templating over high-level data structures all but precludes assembly-language tricks.