As a side note, we also sometimes include GTEST headers ("gtest/gtest.h", "
gmock/gmock.h") in tests files first. However, GTEST is *just* a 3rdparty
library, which means STL headers should go first. I would like to point out
that this is not intentional even though you may see this in our codebase,
so please do not follow this pattern and feel free to fix it if you're
modifying a test file.

On Tue, Nov 10, 2015 at 5:35 PM, Jan Schlicht <[email protected]> wrote:

> Currently there is no consensus on the order of includes. I'm currently
> working on MESOS-2275 and would suggest, that we follow the rules from the
> Google C++ Style Guide (
>
> https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
> )
> as much as possible but also follow the current grouping of includes by
> their level of indirection.
>
> One important question that came up on RR (
> https://reviews.apache.org/r/39449/) is, if we should include the "related
> header" of a source file first. Currently this header is included like any
> other header. How about we should change that practice and include this
> header first to avoid hidden dependencies?
>
> --
> *Jan Schlicht*
> Distributed Systems Engineer, Mesosphere
>

Reply via email to