LukasBanana / LLGL

Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
BSD 3-Clause "New" or "Revised" License
2.05k stars 139 forks source link

Use of angle brackets around file names for include statements #3

Closed elfring closed 7 years ago

elfring commented 7 years ago

Would you like to replace any double quotes by angle brackets around file names for include statements?

LukasBanana commented 7 years ago

Could you please explain why this is meaningful? I typically distinguish between these two forms of include directives on purpose, to avoid mismatches with header files from the preprocessor environment.

elfring commented 7 years ago

I suggest to reconsider the consequences of the following wording from the section "16.2 Source file inclusion" in the standard specification for the programming language "C++".

…
The named source file is searched for in an implementation-defined manner. If this search is not supported, or if the search fails, the directive is reprocessed as if it read

#include <h-char-sequence> new-line
…
LukasBanana commented 7 years ago

From the last link you posted:

include "file"

This variant is used for header files **of your own program**.

And that's what I want for those files, because they are not system files, as it is mentioned from the link for angle brackets:

include

This variant is used for system header files.

So I currently don't see why it should be replaced.

elfring commented 7 years ago

There are different opinions about the handling of the involved implementation-defined behaviour.

LukasBanana commented 7 years ago

For the time being I'll keep it as it is.

elfring commented 7 years ago

I suggest to distinguish better between the include style for ordinary programs and customised libraries. How much do you care where the include files are safely stored for a software library?