Skip to content

Commit 352d73a

Browse files
author
Mariusz Glebocki
committed
Use enable_if_t in a form understandable for clang-tidy.
It doesn't understand non-type template parameters with default value: https://releases.llvm.org/11.1.0/tools/clang/tools/extra/docs/clang-tidy/checks/bugprone-forwarding-reference-overload.html
1 parent 121e80b commit 352d73a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/util/variant.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ class Variant {
281281
constexpr Variant(Variant&& other) noexcept { Construct(std::move(other)); }
282282

283283
// TODO(mglb): enable conditionally
284-
template <class T, std::enable_if_t<type_list_contains_v<T>>* = nullptr>
284+
template <class T, typename = std::enable_if_t<type_list_contains_v<T>>>
285285
constexpr explicit Variant(T&& obj) noexcept {
286286
Construct(std::forward<T>(obj));
287287
}

0 commit comments

Comments
 (0)