Boost logo

Boost :

From: Nicolai Josuttis (nicolai.josuttis_at_[hidden])
Date: 1999-10-14 12:30:33


Alexandre Karev wrote:
>
> >
> >Thanks!
> >However, could you tell me
> > - why you had to include <cstddef>
> > - why you had to include <iterator>
> >I don't see the the need to include them at the moment.
> >So may be I am wrong or the library headers are incorrect.
> >
> >Thanks
> >
>
> Hello, Nicolai!
>
> I'll start with second question because it is very simple:
> <iterator> has been included for ostream_iterator definition.
> At least in the STLport it defined there.
>
Ah, yes, of course!
I'll fix it ASAP
Thanks

> An answer for a first one is - to avoid to be dependent on the
> include file order.
> For example. If the order in Your tests will be
>
> #include <algorithm>
> #include <functional>
> #include <iostream>
> #include <vector>
>
> everything goes fine (this order from compose1.cpp, BTW).
>
> But You have:
>
> #include <iostream>
> #include <vector>
> #include <algorithm>
> #include <functional>
>
> In this case somewhere in depth I got ptrdiff_t undefined.
> So for me to be safe from include file order I had to include
> <cstddef> before <iostream>.
> Of course it can be broken library implementation but that fix
> works for me.
>
OK, but my code is not written to fix all bugs in compilers
(there may be several other include files compilers forget to include
internally).
So, we should send a bug report to STLport.

> Thank You, Sasha.

Thanks you for your help.

> ---
> Alexandre Karev EP/CERN Alexandre.Karev_at_[hidden]
>
> "The most difficult thing is to prove the evident".
> Folk wisdom.
>
> ------------------------------------------------------------------------
>
> eGroups.com home: http://www.egroups.com/group/boost
> http://www.egroups.com - Simplifying group communications

-- 
Nicolai M. Josuttis          	http://www.josuttis.de/
Solutions in Time        	mailto:solutions_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk