Skip to content

Commit

Permalink
change clang-format to version 18
Browse files Browse the repository at this point in the history
  • Loading branch information
chloro-pn committed Jun 5, 2024
1 parent f85cee2 commit 6f921e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
fetch-depth: 0
- name: install clang-format
run: |
sudo apt search clang-format
sudo apt install -y clang-format
clang-format --version
- name: check-diff
Expand Down
2 changes: 1 addition & 1 deletion format.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
find ./ -iname "*.h" -o -iname "*.cc" | xargs clang-format -i 2> /tmp/null
find ./ -iname "*.h" -o -iname "*.cc" | xargs clang-format-18 -i 2> /tmp/null
3 changes: 2 additions & 1 deletion include/wamon/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,8 @@ concept WAMON_SUPPORT_TOVAR = std::same_as<T, int> || std::same_as<T, double> ||
std::same_as<T, bool> || std::same_as<T, std::string>;

template <typename T>
requires WAMON_SUPPORT_TOVAR<std::remove_cvref_t<T>> std::shared_ptr<Variable> ToVar(T&& v) {
requires WAMON_SUPPORT_TOVAR<std::remove_cvref_t<T>>
std::shared_ptr<Variable> ToVar(T&& v) {
using type = std::remove_cvref_t<T>;
WAMON_TO_VAR(int, Int)
WAMON_TO_VAR(double, Double)
Expand Down

0 comments on commit 6f921e2

Please sign in to comment.