chromium/content/browser/indexed_db/list_set.h

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_
#define CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_

#include <stddef.h>

#include <iterator>
#include <list>
#include <memory>
#include <set>

#include "base/check_op.h"
#include "base/not_fatal_until.h"
#include "base/ranges/algorithm.h"

//
// A container class that provides fast containment test (like a set)
// but maintains insertion order for iteration (like list).
//
// Member types of value (primitives and objects by value), raw pointers
// and scoped_refptr<> are supported.
//
template <typename T>
class list_set {};

// Prevent instantiation of list_set<std::unique_ptr<T>> as the current
// implementation would fail.
// TODO(jsbell): Support scoped_ptr through specialization.
list_set<std::unique_ptr<T>>;

#endif  // CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_