mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 12:51:04 +01:00
Use explicit(false) for implicit construction (#6039)
Echoing what was added in #5608, updating existing uses. Unfortunately there's divergent behavior for operators versus constructors, so keeping the nolint on those.
This commit is contained in:
@@ -35,8 +35,8 @@ constexpr auto IsValidTemplateString(int /*unused*/) -> std::true_type {
|
||||
struct AnythingAsTemplateArg {
|
||||
// An implicit constructor that can accept any argument and discards it.
|
||||
template <typename T>
|
||||
// NOLINTNEXTLINE(google-explicit-constructor,bugprone-forwarding-reference-overload)
|
||||
constexpr AnythingAsTemplateArg(T&& /*unused*/) {}
|
||||
// NOLINTNEXTLINE(bugprone-forwarding-reference-overload)
|
||||
explicit(false) constexpr AnythingAsTemplateArg(T&& /*unused*/) {}
|
||||
};
|
||||
|
||||
// An overload that will be active for any template argument. Returns a false
|
||||
|
||||
Reference in New Issue
Block a user