Jean-Marc Lasgouttes wrote:

> Le 12/06/2016 12:14, Stephan Witt a écrit :
>>> Different structure of headers, just switching between different gcc
>>> versions and their accompanied libs is enough to trigger such errors on
>>> the same system.
>>
>> I’m not used to this behavior with other development environment.

But I am. I have seen it when switching from one MSVC version to another, 
and with Intel compilers as well. My impression is that compiler vendors try 
to remove more and more of these unwanted dependencies from version to 
version. Especially gcc was known to pull in many unneeded includes, so it 
is good that they reduce them.

> For example, the docs say that the <algorithm> header is required for
> std::count. However, on some sustems, it may happen that some other
> header does include <algorithm> already, so that an explicit loading is
> not necessary.
> 
> This is a weakness of C-style headers IMO. They do not allow to specify
> these kind of things correctly.

Indeed.


Georg

Reply via email to