value.hpp 699 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // Copyright (c) 2022 Dmitry Arkhipov ([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/json
  8. //
  9. #ifndef BOOST_JSON_IMPL_VALUE_HPP
  10. #define BOOST_JSON_IMPL_VALUE_HPP
  11. namespace boost {
  12. namespace json {
  13. value&
  14. value::at_pointer(string_view ptr) &
  15. {
  16. auto const& self = *this;
  17. return const_cast<value&>( self.at_pointer(ptr) );
  18. }
  19. value&&
  20. value::at_pointer(string_view ptr) &&
  21. {
  22. return std::move( this->at_pointer(ptr) );
  23. }
  24. } // namespace json
  25. } // namespace boost
  26. #endif // BOOST_JSON_IMPL_VALUE_HPP