mardi 29 décembre 2015

Why does std::copy_n take a template parameter instead of std::size_t?

So simple question.

template<class InputIt, class Size, class OutputIt>
OutputIt copy_n(InputIt first, Size count, OutputIt result);

Why does std::copy_n take a type for the number of elements it's going to copy instead of simply std::size_t? I just can't think of a reason.

template<class InputIt, class OutputIt>
OutputIt copy_n(InputIt first, std::size_t count, OutputIt result);

Aucun commentaire:

Enregistrer un commentaire