While searching the doc on cppreference.com, I've seen that some features are defined multiple times in different headers...
For example: std::move
(in <algorithm>
and <utility>
), std::size_t
, etc (see below).
The page about std::size_t
starts with this precision:
Defined in header <cstddef> Defined in header <cstdio> Defined in header <cstdlib> Defined in header <cstring> Defined in header <ctime> Defined in header <cuchar> (since C++17) Defined in header <cwchar>
Why is this the case? And which header should one choose rather than any other?