Commit 1eee8628 authored by Phil Willoughby's avatar Phil Willoughby Committed by Facebook Github Bot

launder

Summary: Backport C++17's `std::launder`.

Reviewed By: yfeldblum, ot

Differential Revision: D5370531

fbshipit-source-id: b7cc6701d082b6c4855fa77bb644e151ce882deb
parent 737be952
......@@ -260,4 +260,11 @@ class MoveOnly {
using MoveOnly = moveonly_::MoveOnly;
/**
* Backport from C++17 of std::launder
*/
template <typename T>
constexpr T* launder(T* in) {
return (in + 1) - 1;
}
} // namespace folly
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