Skip to content

Commit f233e3f

Browse files
committed
fix some clang tidy checks
1 parent ea81cc2 commit f233e3f

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

.clang-tidy

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
---
22
Checks: >-
33
*,
4+
,-cppcoreguidelines-macro-usage,
5+
,-cppcoreguidelines-missing-std-forward,
6+
,-fuchsia-*,
47
,-google-readability-namespace-comments,
58
,-google-runtime-references,
69
,-google-build-using-namespace,
10+
,-hicpp-named-parameter,
711
,-llvm-header-guard,
812
,-llvm-namespace-comment,
13+
,-llvmlibc-*,
14+
,-misc-include-cleaner,
915
,-readability-braces-around-statements,
1016
,-readability-named-parameter,
1117
,-fuchsia-overloaded-operator,
1218
,-fuchsia-default-arguments,
1319
,-fuchsia-trailing-return,
1420
,-hicpp-braces-around-statements,
15-
#,-hicpp-explicit-conversions,
21+
,-readability-identifier-length,
22+
#,-hicpp-explicit-conversions,

src/strong19.lib/strong19/Strong.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ template<class V> struct Weak {
2525
V v{};
2626
constexpr Weak() = default;
2727
template<class... Ts> requires(sizeof...(Ts) > 0 && std::is_constructible_v<V, Ts...>)
28-
constexpr explicit Weak(Ts&&... ts) : v((Ts &&) ts...) {}
29-
bool operator==(const Weak&) const = default;
28+
constexpr explicit Weak(Ts&&... ts) : v((Ts&&)ts...) {}
29+
auto operator==(const Weak&) const -> bool = default;
3030
};
3131

3232
#ifndef DECLARE_STRONG_EXTRAS
@@ -39,10 +39,12 @@ template<class V> struct Weak {
3939
/// Forward declares a strong value type with name @param NAME that stores value of type @param VALUE and optional tags
4040
#define DECLARE_STRONG(NAME, VALUE, ...) \
4141
struct NAME; \
42-
[[maybe_unused]] constexpr inline auto isStrong(strong19::ADL*, NAME*)->bool { return true; } \
43-
[[maybe_unused]] auto strongValueType(NAME*)->STRONG19_REMOVEPAREN(VALUE); \
44-
[[maybe_unused]] auto strongTags(NAME*)->meta19::TypePack<__VA_ARGS__>; \
45-
[[maybe_unused]] constexpr inline auto strongName(NAME*)->string19::StringView { return string19::viewLiteral(#NAME); } \
42+
[[maybe_unused]] constexpr inline auto isStrong(strong19::ADL*, NAME*) -> bool { return true; } \
43+
[[maybe_unused]] auto strongValueType(NAME*) -> STRONG19_REMOVEPAREN(VALUE); \
44+
[[maybe_unused]] auto strongTags(NAME*) -> meta19::TypePack<__VA_ARGS__>; \
45+
[[maybe_unused]] constexpr inline auto strongName(NAME*) -> string19::StringView { \
46+
return string19::viewLiteral(#NAME); \
47+
} \
4648
DECLARE_STRONG_EXTRAS(NAME) \
4749
struct NAME
4850

@@ -62,7 +64,7 @@ template<class V> struct Weak {
6264
using Weak::Weak; \
6365
using Weak::v; \
6466
STRONG19_IGNORE_DEFAULTED_FUNCTION_DELETED \
65-
bool operator==(const NAME&) const = default; \
67+
auto operator==(const NAME&) const -> bool = default; \
6668
STRONG19_RESTORE_DEFAULTED_FUNCTION_DELETED \
6769
}; \
6870
DEFINE_STRONG_EXTRAS(NAME) \

0 commit comments

Comments
 (0)