Commit 7a053dd5 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Fix as_const detection for libc++

Summary:
[Folly] Fix as_const detection for libc++, which has the function in C++17 mode as of clang-v5 but which does not define the recommended feature-test macro `__cpp_lib_as_const`.

(Note: this ignores all push blocking failures!)

Reviewed By: ngoyal

Differential Revision: D12812804

fbshipit-source-id: 25e01be2688346e9e434a44cf01df142129ae339
parent 733bf267
...@@ -86,7 +86,7 @@ constexpr typename std::decay<T>::type copy(T&& value) noexcept( ...@@ -86,7 +86,7 @@ constexpr typename std::decay<T>::type copy(T&& value) noexcept(
* *
* Like C++17's std::as_const. See http://wg21.link/p0007 * Like C++17's std::as_const. See http://wg21.link/p0007
*/ */
#if __cpp_lib_as_const || _MSC_VER #if __cpp_lib_as_const || _LIBCPP_STD_VER > 14 || _MSC_VER
/* using override */ using std::as_const; /* using override */ using std::as_const;
......
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