tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

cxx20_erase.h (1505B)


      1 // Copyright 2021 The Chromium Authors
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef BASE_CONTAINERS_CXX20_ERASE_H_
      6 #define BASE_CONTAINERS_CXX20_ERASE_H_
      7 
      8 #include "base/containers/cxx20_erase_deque.h"
      9 #include "base/containers/cxx20_erase_forward_list.h"
     10 #include "base/containers/cxx20_erase_list.h"
     11 #include "base/containers/cxx20_erase_map.h"
     12 #include "base/containers/cxx20_erase_set.h"
     13 #include "base/containers/cxx20_erase_string.h"
     14 #include "base/containers/cxx20_erase_unordered_map.h"
     15 #include "base/containers/cxx20_erase_unordered_set.h"
     16 #include "base/containers/cxx20_erase_vector.h"
     17 
     18 // Erase/EraseIf are based on C++20's uniform container erasure API:
     19 // - https://eel.is/c++draft/libraryindex#:erase
     20 // - https://eel.is/c++draft/libraryindex#:erase_if
     21 // They provide a generic way to erase elements from a container.
     22 // The functions here implement these for the standard containers until those
     23 // functions are available in the C++ standard.
     24 // Note: there is no std::erase for standard associative containers so we don't
     25 // have it either.
     26 
     27 // This header is provided for convenience, so callers to Erase/EraseIf can just
     28 // include this in their .cc file without thinking about which Erase/EraseIf
     29 // specialization header to include. For uncommon cases where Erase/EraseIf are
     30 // used in .h files, please include the specialization header to avoid bloating
     31 // the header.
     32 
     33 #endif  // BASE_CONTAINERS_CXX20_ERASE_H_