Commit 6329dbd5 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

thunk::noop<...>

Summary: So that downstream locations do not have to write their own noop functions.

Reviewed By: iahs

Differential Revision: D27022664

fbshipit-source-id: e8f69c7babf853a71dedd24ded59c5017cf18ad6
parent b3cbe1d5
......@@ -424,6 +424,7 @@ namespace detail {
// * ruin: operator delete
// * ctor: in-place default constructor
// * dtor: in-place destructor
// * noop: no-op function with the given arguments
struct thunk {
template <typename T>
static void* make() {
......@@ -442,6 +443,9 @@ struct thunk {
static void dtor(void* ptr) noexcept {
static_cast<T*>(ptr)->~T();
}
template <typename... T>
static void noop(T...) noexcept {}
};
} // namespace detail
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment