Replace "#pragma once" macro with header guard
Is your feature request related to a problem? Please describe.
google c++ code style header guard is preferred than "#pragma once"
Describe the solution you'd like
replace those "#pragma once" with header guard
I think it's not necessary to replace #pragma once with header guard.
#pragma once has been well supported across compilers since not actually part of the standard, and it's less prone to make mistakes and less code to type.
I actually think compiler dependent is part of the problem, although it's not so urgent.
In fact, you don't even have to type in these guards. Lots of IDEs, even editors such as "vs code" would do these things automatically.
If we were to do this, we could also enforce cpplint and clang-format in the CI procedure.
使用头文件保护会导致以后修改文件名的时也需要一起修改宏的名称, 而使用 #pragma once 则没有这个顾虑.
在编译器兼容性方面, #pragma once 应该不再是一个问题了, 如果代码检查工具依然存在相关的规则, 可以考虑将相关规则禁用.