has_signature.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // experimental/detail/has_signature.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
  11. #define ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #include "asio/detail/type_traits.hpp"
  17. #include "asio/detail/push_options.hpp"
  18. namespace asio {
  19. namespace experimental {
  20. namespace detail {
  21. template <typename S, typename... Signatures>
  22. struct has_signature;
  23. template <typename S, typename... Signatures>
  24. struct has_signature;
  25. template <typename S>
  26. struct has_signature<S> : false_type
  27. {
  28. };
  29. template <typename S, typename... Signatures>
  30. struct has_signature<S, S, Signatures...> : true_type
  31. {
  32. };
  33. template <typename S, typename Head, typename... Tail>
  34. struct has_signature<S, Head, Tail...> : has_signature<S, Tail...>
  35. {
  36. };
  37. } // namespace detail
  38. } // namespace experimental
  39. } // namespace asio
  40. #include "asio/detail/pop_options.hpp"
  41. #endif // ASIO_EXPERIMENTAL_DETAIL_HAS_SIGNATURE_HPP