Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 818
Forrest Avatar asked Apr 25 '11 02:04

Forrest


2 Answers

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.

like image 167
Potatoswatter Avatar answered Nov 07 '22 02:11

Potatoswatter


No - when working for my previous employer, we used a whole protocol stack (with some STL) written in C++ for our desktop client to bootstrap development of our iPhone client. Worked great.

like image 25
Smokey.Canoe Avatar answered Nov 07 '22 01:11

Smokey.Canoe