From: Yedidya Feldblum Date: Fri, 3 Nov 2017 02:44:08 +0000 (-0700) Subject: Alias std::launder when it is available X-Git-Tag: v2017.11.06.00~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61ba3c11be5e7831bdb659fc0c35979910c3f637;p=folly.git 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 --- diff --git a/folly/lang/Launder.h b/folly/lang/Launder.h index fb0e5f7a..b54d7e68 100644 --- a/folly/lang/Launder.h +++ b/folly/lang/Launder.h @@ -16,9 +16,26 @@ #pragma once +#include + #include #include +/*** + * 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 void launder(T (*)(Args...)) = delete; } // namespace folly + +#endif