Fix or locally suppress clang warning -Wunused-member-function

This commit is contained in:
Roelf-Jilling 2018-11-16 22:08:28 +01:00
parent 07d8865afd
commit 337a03cd52

View File

@ -55,9 +55,18 @@ struct DerivedClass : BaseClass
}; };
struct AddressOverloaded struct AddressOverloaded
{ {
#if (__cplusplus > 201402L)
[[maybe_unused]]
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-member-function"
#endif
AddressOverloaded operator&() const { return {}; } AddressOverloaded operator&() const { return {}; }
#if !(__cplusplus > 201402L) && defined(__clang__)
#pragma clang diagnostic pop
#endif
}; };
} } // namespace
GSL_SUPPRESS(con.4) // NO-FORMAT: attribute GSL_SUPPRESS(con.4) // NO-FORMAT: attribute
TEST_CASE("default_constructor") TEST_CASE("default_constructor")