Hi everybody!
It's time for another 'how do i do this in c++ without loosing my grip'-question!
This time:
Considering the following code taken from cplusplus.com:
template<class InputIterator, class OutputIterator>
OutputIterator copy ( InputIterator first, InputIterator last, OutputIterator result )
{
while (first!=last) *result++ = *first++;
return result;
}
Is there a way to cast *first
to the type of *result
?
In other words: is there a way to determine (at compiletime) the type of result?