optional.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // Copyright (c) 2022 Vinnie Falco (vinnie.falco@gmail.com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/url
  8. //
  9. #ifndef BOOST_URL_OPTIONAL_HPP
  10. #define BOOST_URL_OPTIONAL_HPP
  11. #include <boost/url/detail/config.hpp>
  12. #include <boost/optional.hpp>
  13. namespace boost {
  14. namespace urls {
  15. #ifndef BOOST_URL_DOCS
  16. /** The type of optional used by the library
  17. @warning This alias is no longer supported and
  18. should not be used in new code. Please use
  19. `boost::optional` instead.
  20. This alias is included for backwards
  21. compatibility with earlier versions of the
  22. library.
  23. However, it will be removed in future releases,
  24. and using it in new code is not recommended.
  25. Please use the updated version instead to
  26. ensure compatibility with future versions of
  27. the library.
  28. */
  29. template<class T>
  30. using optional
  31. BOOST_URL_DEPRECATED("Use boost::optional<T> instead") =
  32. boost::optional<T>;
  33. #else
  34. /** The type of optional used by the library
  35. @warning This alias is no longer supported and
  36. should not be used in new code. Please use
  37. `boost::optional` instead.
  38. This alias is included for backwards
  39. compatibility with earlier versions of the
  40. library.
  41. However, it will be removed in future releases,
  42. and using it in new code is not recommended.
  43. Please use the updated version instead to
  44. ensure compatibility with future versions of
  45. the library.
  46. */
  47. template<class T>
  48. using optional = boost::optional<T>;
  49. #endif
  50. } // urls
  51. } // boost
  52. #endif