https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118458
--- Comment #6 from Stephen Berry <stephenberry.developer at gmail dot com> --- Here is my primary case for disabling the waring: https://github.com/stephenberry/glaze/blob/main/include/glaze/reflection/to_tuple.hpp Line 38 This is for the any_t operator T: template <class T> requires(!std::same_as<T, const char*> && !std::same_as<T, std::nullptr_t>) [[maybe_unused]] constexpr operator T() const; This code is used for compile time reflection. It enables counting the number of members in a struct at compile time. So, there is no use of this function call at runtime. The fact that it is never defined is critical because it allows custom types to be counted.