Comments (4)
Thanks for your advise!
The "Noncompliant Code Example" : #define _MY_HEADER_H_
, and the reason why it's noncompliant is "The name may clash with reserved names defined by the implementation of the C++ standard template library in its headers or with reserved names implicitly predefined by the compiler even when no C++ standard library header is included"; and the macro defined in C++ standard template library may be like #ifndef _GLIBCXX_ISTREAM
that begins with an underscore, so avoiding using leading or trailing underscores in the name of the header guard may be compliant solution.
But this may be not only one compliant solution! The 'Google C++ Style Guide' advise the symbol name should be : #define PROJECT_PATH_FILE_H_
. I think if it can achieve the purpose that not clash with reserved names defined by the C++ standard template, the macro that begins and ends with double underscore may be also ok.
Do you think so?
from qconf.
It is popular to use a suffix like "_H
" for include guards. - There are better ways to make your identifiers reasonably unique.
Would you like to avoid that your software depends on undefined behaviour?
from qconf.
To make our identifiers unique, we'll take your advice, thanks again!
from qconf.
Thanks for your improvement of affected include guards.
from qconf.
Related Issues (20)
- php7 qconf_manager扩展QConfZK循环操作多个zookeeper报段错误
- python3.7 编译 qconf 扩展 error: command 'clang' failed with exit status 1 HOT 1
- init fail HOT 1
- mac cmake 通过 make 报错了 HOT 6
- qconf获取大量数据失败
- debian10 下编译报错 HOT 1
- how time support etcd
- MacOS 10.15 + Xcode 11.1 编译不过
- mac 启动 Failed to open gdbm file:/usr/local/qconf/dumps/_dump.gdbm; gdbm err:Can't be writer
- 网络中断又恢复后无法拉取配置
- cmake失败报错 HOT 2
- java client多线程调用导致crash
- make error on macOS
- /usr/bin/ld: 找不到 -lpthreads HOT 4
- 更新bash 5的sh启动脚本
- java driver set max buffer 256K in the method of getConf()
- cmake error HOT 3
- Cmake编译报错 HOT 1
- how to solve?
- GO 编译时在此[golang:1.20-alpine]docker镜像内编译失败? HOT 1
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 qconf.