Suppress unused typedef warning when using clang.
diff --git a/asio/include/asio/detail/handler_type_requirements.hpp b/asio/include/asio/detail/handler_type_requirements.hpp index 64b80a1..04bab88 100644 --- a/asio/include/asio/detail/handler_type_requirements.hpp +++ b/asio/include/asio/detail/handler_type_requirements.hpp
@@ -53,8 +53,10 @@ # include "asio/handler_type.hpp" #endif // defined(ASIO_ENABLE_HANDLER_TYPE_REQUIREMENTS) -// Newer gcc needs special treatment to suppress unused typedef warnings. -#if defined(__GNUC__) +// Newer gcc, clang need special treatment to suppress unused typedef warnings. +#if defined(__clang__) && (__clang_major__ >= 7) +# define ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) +#elif defined(__GNUC__) # if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4) # define ASIO_UNUSED_TYPEDEF __attribute__((__unused__)) # endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)