Generally, do NOT rely on the header files that includes other header files.
Always include and only include the header files you need.
For example, if you want to use std::swap()
, Google it and you'll see if requires <algorithm>
in c++98 and <utility>
in c++11, so you should include the file to make sure your code compiles.