You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include <> will always look in directories the specified for the target or the system location(s), while #include "" will also look on the filesystem relative to the file before that.
This extra work incurs some cost, however the ability to group includes differently using clang-format is useful.
The text was updated successfully, but these errors were encountered:
#include <> will always look in directories the specified for the target or the system location(s), while #include "" will also look on the filesystem relative to the file before that.
Not quite
For <...>:
15.3.2
A preprocessing directive of the form
# include < h-char-sequence > new-line
searches a sequence of implementation-defined places for...
And for "...":
15.3.3
A preprocessing directive of the form
# include " q-char-sequence " new-line
causes... [skip] ...searched for in an implementation-defined manner.
The only thing here that isn't implementation defined as such is that, if the implementation declines to implement 15.3.3, it is allowed to replace the quotation marks with angle brackets and just do a 15.3.2 search instead.
Which all really just goes to say: It really is up to the individual project what kind of #include style will work for their specific setup, so: Whether or not cmake-init advertises that it is opinionated, for this specific purpose, there is such a thing as a wrong opinion, and the wrong opinion is per-project, meaning it cannot be known ahead of time.
#include <>
will always look in directories the specified for the target or the system location(s), while#include ""
will also look on the filesystem relative to the file before that.This extra work incurs some cost, however the ability to group includes differently using clang-format is useful.
The text was updated successfully, but these errors were encountered: