// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_VALUE_ITERATORS_H_ #define BASE_VALUE_ITERATORS_H_ #include <memory> #include <string> #include <utility> #include "base/base_export.h" #include "base/containers/flat_map.h" #include "base/memory/raw_ptr.h" namespace base { class Value; namespace detail { DictStorage; // This iterator closely resembles DictStorage::iterator, with one // important exception. It abstracts the underlying unique_ptr away, meaning its // value_type is std::pair<const std::string, Value>. It's reference type is a // std::pair<const std::string&, Value&>, so that callers have read-write // access without incurring a copy. class BASE_EXPORT dict_iterator { … }; // This iterator closely resembles DictStorage::const_iterator, with one // important exception. It abstracts the underlying unique_ptr away, meaning its // value_type is std::pair<const std::string, Value>. It's reference type is a // std::pair<const std::string&, const Value&>, so that callers have read-only // access without incurring a copy. class BASE_EXPORT const_dict_iterator { … }; } // namespace detail } // namespace base #endif // BASE_VALUE_ITERATORS_H_