for example I have project with 200 classes (200 headers and 200 compilatioin units),
each my class has members which hold some strings, mean I have to include string header from STL into each my header.
from another side I know I wouldn’t need most of string class functionality(it’s metods etc) in my compilation units.
that means each my compilation unit will have whole string class included but all I need is keyword “string”.
compilation will take much longer! I will compile string class 200 times!
is it better in this case to use just char keyword or make some custom string class which will not be so big as string class is?
thanks.
You really should use std::string, because of many reasons:
<string>is tiny compared to total compilation time for a normal project