PlistCpp
PlistCpp copied to clipboard
Use of angle brackets around file names for include statements
Would you like to replace any double quotes by angle brackets around file names for include statements?
I'm not sure that is necessary. I prefer the double quotes because most compiler implementations search the local directory of the file with the include statement first, which does not force the user to install in a standard location. Whereas using <> does force the user to install in a standard location because most implementations will not search the local directory.
Both <> and "" are implementation dependent according to the standard anyway.
On Tue, Nov 10, 2015 at 10:11:39AM -0800, Markus Elfring wrote:
Would you like to replace any double quotes by angle brackets around file names for include statements?
— Reply to this email directly or view it on GitHub.*
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
…
- How do you think about to avoid "a duplicated file search" here?
- Would you like to restrict the searched directories for header files of your software?
I do not understand the problem you are trying to solve?
On Tue, Nov 10, 2015 at 10:55:41AM -0800, Markus Elfring wrote:
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
new-line … • How do you think about to avoid "a duplicated file search" here? • Would you like to restrict the searched directories for header files of your software?
— Reply to this email directly or view it on GitHub.*
There are different opinions about the handling of the involved implementation-defined behaviour.
- Will header files be also searched outside the specified include directories if double quotes are used for the discussed preprocessor statement?
- Is there a speed difference measurable if a file is not found there and the search will be retried with "the angle brackets inclusion method"?