Skip to content

Commit 0fe8e08

Browse files
committed
Reverted to old clang-format hook
1 parent e97d09b commit 0fe8e08

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ repos:
99
- id: check-yaml
1010
- id: check-added-large-files
1111

12+
# TODO: keep this version, do not update!
1213
# Clang-format for C++
1314
# This brings in a portable version of clang-format.
1415
# See also: https://github.com/ssciwr/clang-format-wheel
1516
- repo: https://github.com/pre-commit/mirrors-clang-format
16-
rev: v19.1.4
17+
rev: v18.1.8
1718
hooks:
1819
- id: clang-format
1920
types_or: [c++, c]

include/beman/optional26/detail/stl_interfaces/iterator_interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ BEMAN_OPTIONAL26_DETAIL_STL_INTERFACES_NAMESPACE_V1 {
229229
template <typename D = Derived>
230230
constexpr auto operator->() const
231231
noexcept(noexcept(detail::make_pointer<pointer, reference>(*std::declval<const D&>())))
232-
-> decltype(detail::make_pointer<pointer, reference>(*std::declval<const D&>())) {
232+
-> decltype(detail::make_pointer<pointer, reference>(*std::declval<const D&>())) {
233233
return detail::make_pointer<pointer, reference>(*derived());
234234
}
235235

papers/P2988/optional.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ constexpr auto optional<T&>::and_then(F&& f) const {
326326

327327
template <class T>
328328
template <class F>
329-
constexpr auto optional<T&>::transform(F&& f) const
330-
-> optional<invoke_result_t<F, T&>> {
329+
constexpr auto
330+
optional<T&>::transform(F&& f) const -> optional<invoke_result_t<F, T&>> {
331331
using U = invoke_result_t<F, T&>;
332332
if (has_value()) {
333333
return optional<U>{invoke(std::forward<F>(f), *value_)};

papers/P2988/optional_ref.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ class optional<T&> {
132132
}
133133

134134
template <class F>
135-
constexpr auto transform(F&& f) const
136-
-> optional<std::invoke_result_t<F, T&>> {
135+
constexpr auto
136+
transform(F&& f) const -> optional<std::invoke_result_t<F, T&>> {
137137
using U = std::invoke_result_t<F, T&>;
138138
return (has_value())
139139
? optional<U>{std::invoke(std::forward<F>(f), *value_)}

0 commit comments

Comments
 (0)