Search code examples
c++coding-stylec-preprocessorconventions

include boost header file using "" or <>


Why does tuple documentation say to use, for example:

#include "boost/tuple/tuple.hpp"

and not

#include <boost/tuple/tuple.hpp>

I know that it's not probable my code will have a file called "boost/tuple/tuple.hpp", but using include <> states explicitly not to look in the curent directory.

So what is the reason?


Solution

  • Afaik the reason is to differentiate between headers that belong to an application and those which are from external libraries. I can't say why they have not used this convention. It is a only a convention and not a rule.

    Perhaps someone should raise this issue with the Boost maintainers?