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.

string_view.hpp 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // detail/string_view.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_DETAIL_STRING_VIEW_HPP
  11. #define ASIO_DETAIL_STRING_VIEW_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. #if defined(ASIO_HAS_STRING_VIEW)
  17. #if defined(ASIO_HAS_STD_STRING_VIEW)
  18. # include <string_view>
  19. #elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
  20. # include <experimental/string_view>
  21. #else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
  22. # error ASIO_HAS_STRING_VIEW is set but no string_view is available
  23. #endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
  24. namespace asio {
  25. #if defined(ASIO_HAS_STD_STRING_VIEW)
  26. using std::basic_string_view;
  27. using std::string_view;
  28. #elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
  29. using std::experimental::basic_string_view;
  30. using std::experimental::string_view;
  31. #endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
  32. } // namespace asio
  33. # define ASIO_STRING_VIEW_PARAM asio::string_view
  34. #else // defined(ASIO_HAS_STRING_VIEW)
  35. # define ASIO_STRING_VIEW_PARAM const std::string&
  36. #endif // defined(ASIO_HAS_STRING_VIEW)
  37. #endif // ASIO_DETAIL_STRING_VIEW_HPP