optional.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // Copyright (c) 2022 Vinnie Falco ([email protected])
  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. /** The type of optional used by the library
  16. @warning This alias is no longer supported and
  17. should not be used in new code. Please use
  18. `boost::optional` instead.
  19. This alias is included for backwards
  20. compatibility with earlier versions of the
  21. library.
  22. However, it will be removed in future releases,
  23. and using it in new code is not recommended.
  24. Please use the updated version instead to
  25. ensure compatibility with future versions of
  26. the library.
  27. */
  28. #ifndef BOOST_URL_DOCS
  29. template<class T>
  30. using optional
  31. BOOST_URL_DEPRECATED("Use boost::optional<T> instead") =
  32. boost::optional<T>;
  33. #else
  34. template<class T>
  35. using optional = boost::optional<T>;
  36. #endif
  37. } // urls
  38. } // boost
  39. #endif