mirror of
https://github.com/facebook/rocksdb.git
synced 2024-12-04 20:02:50 +00:00
3db2cf113d
Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/11826 Reviewed By: jaykorean Differential Revision: D49233043 fbshipit-source-id: cadf6cda3b9720789609e3d3d9404822c6681da2
24 lines
711 B
C++
24 lines
711 B
C++
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
// This source code is licensed under both the GPLv2 (found in the
|
|
// COPYING file in the root directory) and Apache 2.0 License
|
|
// (found in the LICENSE.Apache file in the root directory).
|
|
|
|
#pragma once
|
|
|
|
#include "rocksdb/rocksdb_namespace.h"
|
|
|
|
namespace ROCKSDB_NAMESPACE {
|
|
|
|
// A helper template that can combine multiple functors into a single one to be
|
|
// used with std::visit for example. It also works with lambdas, since it
|
|
// comes with an explicit deduction guide.
|
|
template <typename... Ts>
|
|
struct overload : Ts... {
|
|
using Ts::operator()...;
|
|
};
|
|
|
|
template <typename... Ts>
|
|
overload(Ts...) -> overload<Ts...>;
|
|
|
|
} // namespace ROCKSDB_NAMESPACE
|