Commit 145009b4 authored by Dominik Charousset's avatar Dominik Charousset

Update clang-format to version 16

parent f39e3fea
...@@ -12,4 +12,4 @@ jobs: ...@@ -12,4 +12,4 @@ jobs:
- name: Run clang-format. - name: Run clang-format.
uses: jidicula/clang-format-action@v4.10.1 uses: jidicula/clang-format-action@v4.10.1
with: with:
clang-format-version: '15' clang-format-version: '16'
...@@ -159,9 +159,7 @@ public: ...@@ -159,9 +159,7 @@ public:
template <class Inspector> template <class Inspector>
friend bool inspect(Inspector& f, node_id& x) { friend bool inspect(Inspector& f, node_id& x) {
auto is_present = [&x] { return x.data_ != nullptr; }; auto is_present = [&x] { return x.data_ != nullptr; };
auto get = [&]() -> const auto& { auto get = [&]() -> const auto& { return x.data_->content; };
return x.data_->content;
};
auto reset = [&x] { x.data_.reset(); }; auto reset = [&x] { x.data_.reset(); };
auto set = [&x](node_id_data::variant_type&& val) { auto set = [&x](node_id_data::variant_type&& val) {
if (x.data_ && x.data_->unique()) if (x.data_ && x.data_->unique())
......
...@@ -333,7 +333,9 @@ public: ...@@ -333,7 +333,9 @@ public:
[[maybe_unused]] constexpr bool operator!=(atom_name, atom_name) { \ [[maybe_unused]] constexpr bool operator!=(atom_name, atom_name) { \
return false; \ return false; \
} \ } \
inline std::string to_string(atom_name) { return atom_text; } \ inline std::string to_string(atom_name) { \
return atom_text; \
} \
template <class Inspector> \ template <class Inspector> \
auto inspect(Inspector& f, atom_name& x) { \ auto inspect(Inspector& f, atom_name& x) { \
return f.object(x).fields(); \ return f.object(x).fields(); \
......
...@@ -48,8 +48,12 @@ private: \ ...@@ -48,8 +48,12 @@ private: \
type name##_ = type{}; \ type name##_ = type{}; \
\ \
public: \ public: \
const auto& name() const noexcept { return name##_; } \ const auto& name() const noexcept { \
void name(type value) { name##_ = std::move(value); } return name##_; \
} \
void name(type value) { \
name##_ = std::move(value); \
}
// A mean data type designed for maximum coverage of the inspect API. // A mean data type designed for maximum coverage of the inspect API.
class nasty { class nasty {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment