/** * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef LIBPANDABASE_UTILS_ARENA_CONTAINERS_H #define LIBPANDABASE_UTILS_ARENA_CONTAINERS_H #include #include #include #include #include #include #include #include #include #include #include #include "mem/arena_allocator.h" #include "mem/arena_allocator_stl_adapter.h" namespace panda { template using ArenaVector = std::vector>; template using ArenaDeque = std::deque>; template > using ArenaStack = std::stack; template > using ArenaQueue = std::queue; template using ArenaList = std::list>; template , bool use_oom_handler = false> using ArenaSet = std::set>; template , bool use_oom_handler = false> using ArenaMap = std::map, use_oom_handler>>; template , bool use_oom_handler = false> using ArenaMultiMap = std::multimap, use_oom_handler>>; template , class KeyEqual = std::equal_to, bool use_oom_handler = false> using ArenaUnorderedMultiMap = std::unordered_multimap, use_oom_handler>>; template , class KeyEqual = std::equal_to, bool use_oom_handler = false> using ArenaUnorderedMap = std::unordered_map, false>>; template using ArenaDoubleUnorderedMap = ArenaUnorderedMap, std::equal_to, use_oom_handler>, std::hash, std::equal_to, use_oom_handler>; template , class KeyEqual = std::equal_to, bool use_oom_handler = false> using ArenaUnorderedSet = std::unordered_set>; template using ArenaStringT = std::basic_string, ArenaAllocatorAdapter>; using ArenaString = ArenaStringT; } // namespace panda #endif // LIBPANDABASE_UTILS_ARENA_CONTAINERS_H