2013/9/12 Avi Hal <avi...@gmail.com>

> On Sunday, September 8, 2013 6:22:01 AM UTC+3, Benoit Jacob wrote:
> > Hi,
> >
> >
> >
> > It seems that we have some much-included header files including
> <algorithm>
> >
> > just to get std::min and std::max.
> >
>
> Is it because min/max are used at the h file?


Yes.

can it be delegated to cpp files?


When it can, that's the easy case. So the case that we're really discussing
here is when it can't because the existing code intentionally implements a
function in a header to allow it to get inlined (some of that existing code
might be wrong in believing that it needs to get inlined, but that's costly
to prove wrong, needs custom benchmarking for each case).

how many other files which include said h files count on them to include
> <algorithm>?
>

I don't know that.

Benoit
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to