Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bad_address_cast.hpp 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // ip/bad_address_cast.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2019 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_IP_BAD_ADDRESS_CAST_HPP
  11. #define ASIO_IP_BAD_ADDRESS_CAST_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 <typeinfo>
  17. #include "asio/detail/push_options.hpp"
  18. namespace asio {
  19. namespace ip {
  20. /// Thrown to indicate a failed address conversion.
  21. class bad_address_cast :
  22. #if defined(ASIO_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
  23. public std::exception
  24. #else
  25. public std::bad_cast
  26. #endif
  27. {
  28. public:
  29. /// Default constructor.
  30. bad_address_cast() {}
  31. /// Destructor.
  32. virtual ~bad_address_cast() ASIO_NOEXCEPT_OR_NOTHROW {}
  33. /// Get the message associated with the exception.
  34. virtual const char* what() const ASIO_NOEXCEPT_OR_NOTHROW
  35. {
  36. return "bad address cast";
  37. }
  38. };
  39. } // namespace ip
  40. } // namespace asio
  41. #include "asio/detail/pop_options.hpp"
  42. #endif // ASIO_IP_ADDRESS_HPP