摘要: format diff git diff -U0 HEAD^ | clang-format-diff-16 -p1 -i git hook .git/hooks/pre-commit #!/bin/bash STYLE=$(git config --get hooks.clangformat.sty 阅读全文
posted @ 2024-05-28 19:12 stdpain 阅读(8) 评论(0) 推荐(0) 编辑
摘要: C++11 实现 static constexpr 是按照const static 实现的,需要在 .cpp 中定义: // tmp.h class StatisTest { public: static constexpr const char literal[] = "xxx literal"; 阅读全文
posted @ 2024-05-28 17:37 stdpain 阅读(10) 评论(0) 推荐(0) 编辑