Q:

Mixing ObjC and C++ with C++ template classes in more than one source

I'm just thinking of porting some old C++ sources held in my archive to iOS thus supplying a ObjC GUI, using wrappers for some C++ stuff and leave the important data working stuff within the C++ code.  So, the problem is that the old sources come from Win32 MFC thus using CString class for strings and I want to replace that with Joe O'Leary's CStdString which is a C++ template class that will do it just fine ... but:
I have to use the string class definition along with a big bunch of different C++ sources and so each of them will include the CStdString template on their own.  Normally I would write a wrapper for the whole string class, but better if I needn't. 
Will I have a problem with instantiation of strings in the different sources?  Could it make a problem to pass a templated string from one source to another?  In fact I don't know if the compiler generates the code for a template only once or multiple times having the fact that the same instantiation type is used for the template. 
Can you fill some light into this? 
Thanks...

A:

I agree with CString, as long as you stay with std::string or some other multi-platform string implementation for C++ you are not going to face any issues ( even boost works on iOS ). 
I've been integrating C++/Obj-C for about two years now so you can be sure that keeping model classes in C++ ( even with heavily templated code ), is not a problem.  I would advice you to do what you could do best with Obj-C in Obj-C though... ( avoiding being a hammer developer :) )
Good luck!