Comments (7)
The opinions on the SO link are quite differing. The most convincing to me is:
- double quotes when giving relative path.
- angle brackets when in include path.
There are opinions that say it helps distinguish system headers from library headers although I don't think this should be the case.
Is there anything more to it?
from easylambda.
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?
from easylambda.
I totally agree with using angular brackets in examples, tests and for any code that uses the library.
The confusion is for library headers. For e.g. ezl.hpp can have relative paths and double quotes or it can have angular brackets.
I think that its better to have angular brackets everywhere for consistency but just some clarification before going ahead. :)
from easylambda.
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"?
- How do you think about to follow the inclusion style from the class library "Boost"?
from easylambda.
I just checked with Boost 1.54 that uses double quotes everywhere and 1.60 that uses angle brackets everywhere.
Commit for using angle brackets consistently everywhere.
from easylambda.
Thanks for your source code improvement.
from easylambda.
Thanks for the very useful suggestions and informative links.
from easylambda.
Related Issues (10)
- Don't std::move local return values HOT 5
- Running on Windows/MSVC 2015 HOT 6
- Addition of a build system generator HOT 2
- reserved identifier violation HOT 2
- Remove an unnecessary null pointer check HOT 2
- Catch exceptions in main()? HOT 5
- Plots and animations
- Add something similar to functional scan list operation HOT 1
- not surpport vc2015? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easylambda.