Are pointers primitive types in C++?
- by Space_C0wb0y
I was wondering about the last constructor for std::string mentioned here. It says:
template<class InputIterator> string (InputIterator begin, InputIterator end);
If InputIterator is an integral type, behaves as the sixth constructor version (the one right above this) by typecasting begin and end to call it:
string(static_cast<size_t>(begin),static_cast<char>(end));
In any other case, the parameters are taken as iterators, and the content is initialized with the values of the elements that go from the element referred by iterator begin to the element right before the one referred by iterator end.
So what does that mean if InputIterator is a char * ?