Lines Matching defs:operator
270 void operator=(nonesuch const&) = delete;
271 void operator=(nonesuch&&) = delete;
2871 @brief comparison operator for JSON types
2884 inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD*
2886 inline bool operator<(const value_t lhs, const value_t rhs) noexcept
2909 // GCC selects the built-in operator< over an operator rewritten from
2910 // a user-defined spaceship operator
2914 inline bool operator<(const value_t lhs, const value_t rhs) noexcept
3029 constexpr operator size_t() const
3514 // has several constructors/operator= (see https://github.com/nlohmann/json/issues/958)
4339 if (¤t->m_parent->m_value.array->operator[](i) == current)
5030 auto operator()(const BasicJsonType& j, T&& val) const
5146 iteration_proxy_value& operator=(iteration_proxy_value const&) = default;
5151 iteration_proxy_value& operator=(iteration_proxy_value&&)
5156 /// dereference operator (needed for range-based for)
5157 const iteration_proxy_value& operator*() const
5162 /// increment operator (needed for range-based for)
5163 iteration_proxy_value& operator++()
5171 iteration_proxy_value operator++(int)& // NOLINT(cert-dcl21-cpp)
5179 /// equality operator (needed for InputIterator)
5180 bool operator==(const iteration_proxy_value& o) const
5185 /// inequality operator (needed for range-based for)
5186 bool operator!=(const iteration_proxy_value& o) const
5249 iteration_proxy& operator=(iteration_proxy const&) = default;
5251 iteration_proxy& operator=(iteration_proxy&&) noexcept = default;
5731 auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward<T>(val))))
5854 bool operator==(const byte_container_with_subtype& rhs) const
5860 bool operator!=(const byte_container_with_subtype& rhs) const
6129 file_input_adapter& operator=(const file_input_adapter&) = delete;
6130 file_input_adapter& operator=(file_input_adapter&&) = delete;
6174 input_stream_adapter& operator=(input_stream_adapter&) = delete;
6175 input_stream_adapter& operator=(input_stream_adapter&&) = delete;
6708 json_sax& operator=(const json_sax&) = default;
6709 json_sax& operator=(json_sax&&) noexcept = default;
6751 json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete;
6752 json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
6815 object_element = &(ref_stack.back()->m_value.object->operator[](val));
6935 json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete;
6936 json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
7010 object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded);
7433 lexer& operator=(lexer&) = delete;
7434 lexer& operator=(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
9166 binary_reader& operator=(const binary_reader&) = delete;
9167 binary_reader& operator=(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor)
12691 friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
12696 friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
12701 primitive_iterator_t operator+(difference_type n) noexcept
12708 friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept
12713 primitive_iterator_t& operator++() noexcept
12719 primitive_iterator_t operator++(int)& noexcept // NOLINT(cert-dcl21-cpp)
12726 primitive_iterator_t& operator--() noexcept
12732 primitive_iterator_t operator--(int)& noexcept // NOLINT(cert-dcl21-cpp)
12739 primitive_iterator_t& operator+=(difference_type n) noexcept
12745 primitive_iterator_t& operator-=(difference_type n) noexcept
12878 iter_impl& operator=(iter_impl&&) noexcept = default;
12946 iter_impl& operator=(const iter_impl<const BasicJsonType>& other) noexcept
12971 iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept // NOLINT(cert-oop54-cpp)
13066 reference operator*() const
13110 pointer operator->() const
13152 iter_impl operator++(int)& // NOLINT(cert-dcl21-cpp)
13163 iter_impl& operator++()
13203 iter_impl operator--(int)& // NOLINT(cert-dcl21-cpp)
13214 iter_impl& operator--()
13255 bool operator==(const IterImpl& other) const
13291 bool operator!=(const IterImpl& other) const
13293 return !operator==(other);
13300 bool operator<(const iter_impl& other) const
13335 bool operator<=(const iter_impl& other) const
13337 return !other.operator < (*this);
13344 bool operator>(const iter_impl& other) const
13346 return !operator<=(other);
13353 bool operator>=(const iter_impl& other) const
13355 return !operator<(other);
13362 iter_impl& operator+=(difference_type i)
13399 iter_impl& operator-=(difference_type i)
13401 return operator+=(-i);
13408 iter_impl operator+(difference_type i) const
13419 friend iter_impl operator+(difference_type i, const iter_impl& it)
13430 iter_impl operator-(difference_type i) const
13441 difference_type operator-(const iter_impl& other) const
13470 reference operator[](difference_type n) const
13477 JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators", m_object));
13526 return operator*();
13603 json_reverse_iterator operator++(int)& // NOLINT(cert-dcl21-cpp)
13605 return static_cast<json_reverse_iterator>(base_iterator::operator++(1));
13609 json_reverse_iterator& operator++()
13611 return static_cast<json_reverse_iterator&>(base_iterator::operator++());
13615 json_reverse_iterator operator--(int)& // NOLINT(cert-dcl21-cpp)
13617 return static_cast<json_reverse_iterator>(base_iterator::operator--(1));
13621 json_reverse_iterator& operator--()
13623 return static_cast<json_reverse_iterator&>(base_iterator::operator--());
13627 json_reverse_iterator& operator+=(difference_type i)
13629 return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i));
13633 json_reverse_iterator operator+(difference_type i) const
13635 return static_cast<json_reverse_iterator>(base_iterator::operator+(i));
13639 json_reverse_iterator operator-(difference_type i) const
13641 return static_cast<json_reverse_iterator>(base_iterator::operator-(i));
13645 difference_type operator-(const json_reverse_iterator& other) const
13651 reference operator[](difference_type n) const
13653 return *(this->operator+(n));
13667 return it.operator * ();
13762 operator string_t() const
13770 friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr)
13779 json_pointer& operator/=(const json_pointer& ptr)
13789 json_pointer& operator/=(string_t token)
13797 json_pointer& operator/=(std::size_t array_idx)
13804 friend json_pointer operator/(const json_pointer& lhs,
13812 friend json_pointer operator/(const json_pointer& lhs, string_t token) // NOLINT(performance-unnecessary-value-param)
13819 friend json_pointer operator/(const json_pointer& lhs, std::size_t array_idx)
13970 result = &result->operator[](0);
13975 result = &result->operator[](reference_token);
13983 result = &result->operator[](reference_token);
13990 result = &result->operator[](array_index<BasicJsonType>(reference_token));
14021 `operator[]("this").operator[]("that")` on that value, effectively
14061 ptr = &ptr->operator[](reference_token);
14070 ptr = &ptr->operator[](ptr->m_value.array->size());
14075 ptr = &ptr->operator[](array_index<BasicJsonType>(reference_token));
14170 ptr = &ptr->operator[](reference_token);
14183 ptr = &ptr->operator[](array_index<BasicJsonType>(reference_token));
14273 ptr = &ptr->operator[](reference_token);
14313 ptr = &ptr->operator[](idx);
14435 value.m_value.array->operator[](i), result);
14515 // can't use conversion operator because of ambiguity
14535 bool operator==(const json_pointer<RefStringTypeRhs>& rhs) const noexcept
14542 JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer))
14543 bool operator==(const string_t& rhs) const
14550 std::strong_ordering operator<=>(const json_pointer<RefStringTypeRhs>& rhs) const noexcept // *NOPAD*
14559 friend bool operator==(const json_pointer<RefStringTypeLhs>& lhs,
14566 friend bool operator==(const json_pointer<RefStringTypeLhs>& lhs,
14573 friend bool operator==(const StringType& lhs,
14580 friend bool operator!=(const json_pointer<RefStringTypeLhs>& lhs,
14587 friend bool operator!=(const json_pointer<RefStringTypeLhs>& lhs,
14594 friend bool operator!=(const StringType& lhs,
14600 friend bool operator<(const json_pointer<RefStringTypeLhs>& lhs,
14612 inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs,
14620 JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer))
14621 inline bool operator==(const json_pointer<RefStringTypeLhs>& lhs,
14629 JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer))
14630 inline bool operator==(const StringType& lhs,
14637 inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs,
14645 JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer))
14646 inline bool operator!=(const json_pointer<RefStringTypeLhs>& lhs,
14654 JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer))
14655 inline bool operator!=(const StringType& lhs,
14662 inline bool operator<(const json_pointer<RefStringTypeLhs>& lhs,
14722 json_ref& operator=(const json_ref&) = delete;
14723 json_ref& operator=(json_ref&&) = delete;
14735 value_type const& operator*() const
14740 value_type const* operator->() const
14829 output_adapter_protocol& operator=(const output_adapter_protocol&) = default;
14830 output_adapter_protocol& operator=(output_adapter_protocol&&) noexcept = default;
14927 operator output_adapter_t<CharType>()
17964 serializer& operator=(const serializer&) = delete;
17966 serializer& operator=(serializer&&) = delete;
17978 - integer numbers are converted implicitly via `operator<<`
18962 T& operator[](const key_type& key)
18969 T & operator[](KeyType && key)
18974 const T& operator[](const key_type& key) const
18981 const T & operator[](KeyType && key) const
20396 /// @sa https://json.nlohmann.me/api/basic_json/operator=/
20397 basic_json& operator=(basic_json other) noexcept (
20557 constexpr operator value_t() const noexcept
21061 JSON_EXPLICIT operator ValueType() const
21225 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
21226 reference operator[](size_type idx)
21236 // operator[] only works for arrays
21264 return m_value.array->operator[](idx);
21267 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
21271 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
21272 const_reference operator[](size_type idx) const
21274 // const operator[] only works for arrays
21277 return m_value.array->operator[](idx);
21280 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
21284 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
21285 reference operator[](typename object_t::key_type key)
21295 // operator[] only works for objects
21302 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
21306 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
21307 const_reference operator[](const typename object_t::key_type& key) const
21309 // const operator[] only works for objects
21317 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
21323 reference operator[](T* key)
21325 return operator[](typename object_t::key_type(key));
21329 const_reference operator[](T* key) const
21331 return operator[](typename object_t::key_type(key));
21335 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
21338 reference operator[](KeyType && key)
21348 // operator[] only works for objects
21355 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
21359 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
21362 const_reference operator[](KeyType && key) const
21364 // const operator[] only works for objects
21372 JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
22282 /// @sa https://json.nlohmann.me/api/basic_json/operator+=/
22283 reference operator+=(basic_json&& val)
22314 /// @sa https://json.nlohmann.me/api/basic_json/operator+=/
22315 reference operator+=(const basic_json& val)
22345 /// @sa https://json.nlohmann.me/api/basic_json/operator+=/
22346 reference operator+=(const typename object_t::value_type& val)
22369 /// @sa https://json.nlohmann.me/api/basic_json/operator+=/
22370 reference operator+=(initializer_list_t init)
22623 m_value.object->operator[](it.key()) = it.value();
22625 m_value.object->operator[](it.key()).m_parent = this;
22852 bool operator==(const_reference rhs) const noexcept
22869 bool operator==(ScalarType rhs) const noexcept
22876 bool operator!=(const_reference rhs) const noexcept
22882 return !operator==(rhs);
22887 std::partial_ordering operator<=>(const_reference rhs) const noexcept // *NOPAD*
22902 std::partial_ordering operator<=>(ScalarType rhs) const noexcept // *NOPAD*
22914 bool operator<=(const_reference rhs) const noexcept
22927 bool operator<=(ScalarType rhs) const noexcept
22935 bool operator>=(const_reference rhs) const noexcept
22948 bool operator>=(ScalarType rhs) const noexcept
22956 friend bool operator==(const_reference lhs, const_reference rhs) noexcept
22972 friend bool operator==(const_reference lhs, ScalarType rhs) noexcept
22981 friend bool operator==(ScalarType lhs, const_reference rhs) noexcept
22988 friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
23001 friend bool operator!=(const_reference lhs, ScalarType rhs) noexcept
23010 friend bool operator!=(ScalarType lhs, const_reference rhs) noexcept
23017 friend bool operator<(const_reference lhs, const_reference rhs) noexcept
23020 // we compare types. Note we have to call the operator explicitly,
23022 JSON_IMPLEMENT_OPERATOR( <, false, false, operator<(lhs_type, rhs_type))
23029 friend bool operator<(const_reference lhs, ScalarType rhs) noexcept
23038 friend bool operator<(ScalarType lhs, const_reference rhs) noexcept
23045 friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
23058 friend bool operator<=(const_reference lhs, ScalarType rhs) noexcept
23067 friend bool operator<=(ScalarType lhs, const_reference rhs) noexcept
23074 friend bool operator>(const_reference lhs, const_reference rhs) noexcept
23088 friend bool operator>(const_reference lhs, ScalarType rhs) noexcept
23097 friend bool operator>(ScalarType lhs, const_reference rhs) noexcept
23104 friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
23117 friend bool operator>=(const_reference lhs, ScalarType rhs) noexcept
23126 friend bool operator>=(ScalarType lhs, const_reference rhs) noexcept
23145 friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
23164 /// operator<<(std::ostream&, const basic_json&) instead; that is,
23166 JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator<<(std::ostream&, const basic_json&))
23167 friend std::ostream& operator>>(const basic_json& j, std::ostream& o)
23302 /// @deprecated This stream operator is deprecated since 3.0.0 and will be removed in
23304 /// operator>>(std::istream&, basic_json&) instead; that is,
23306 JSON_HEDLEY_DEPRECATED_FOR(3.0.0, operator>>(std::istream&, basic_json&))
23307 friend std::istream& operator<<(basic_json& j, std::istream& i)
23309 return operator>>(i, j);
23314 friend std::istream& operator>>(std::istream& i, basic_json& j)
23764 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
23765 reference operator[](const json_pointer& ptr)
23772 reference operator[](const ::nlohmann::json_pointer<BasicJsonType>& ptr)
23778 /// @sa https://json.nlohmann.me/api/basic_json/operator%5B%5D/
23779 const_reference operator[](const json_pointer& ptr) const
23786 const_reference operator[](const ::nlohmann::json_pointer<BasicJsonType>& ptr) const
23910 // use operator[] to add value
24285 operator[](it.key()).merge_patch(it.value());
24314 inline nlohmann::json operator "" _json(const char* s, std::size_t n)
24322 inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n)
24343 std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const
24357 bool operator()(::nlohmann::detail::value_t lhs,
24363 return ::nlohmann::detail::operator<(lhs, rhs);
24386 using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers)
24387 using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers)