Commit 61ba3c11 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Alias std::launder when it is available

Summary: [Folly] Alias `std::launder` when it is available.

Reviewed By: Orvid

Differential Revision: D6221443

fbshipit-source-id: 33136a8744a39db01fb05513d5ed5476ea67559a
parent a1d0f15a
......@@ -16,9 +16,26 @@
#pragma once
#include <new>
#include <folly/CPortability.h>
#include <folly/Portability.h>
/***
* include or backport:
* * std::launder
*/
#if __cpp_lib_launder >= 201606
namespace folly {
/* using override */ using std::launder;
} // namespace folly
#else
namespace folly {
/**
......@@ -54,3 +71,5 @@ void launder(void const volatile*) = delete;
template <typename T, typename... Args>
void launder(T (*)(Args...)) = delete;
} // namespace folly
#endif
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