Commit b4881fa5 authored by Xiao Shi's avatar Xiao Shi Committed by Facebook Github Bot

adjust config for FOLLY_SUPPLY_MISSING_INT128_TRAITS

Summary:
* remove the redundant `!defined(_WIN32)` condition;
* llvm added traits for (u)int128 in
  https://reviews.llvm.org/D2917; and std::hash in
  https://reviews.llvm.org/rL266587.

Reviewed By: nbronson

Differential Revision: D7111138

fbshipit-source-id: 91a05354846575677eddd48c8b8f4e05c53b01cb
parent 6229600d
......@@ -123,11 +123,16 @@ check_type_size(__int128 INT128_SIZE LANGUAGE CXX)
if (NOT INT128_SIZE STREQUAL "")
set(FOLLY_HAVE_INT128_T ON)
check_cxx_source_compiles("
#include <functional>
#include <type_traits>
#include <utility>
static_assert(
::std::is_same<::std::make_signed<unsigned __int128>::type,
__int128>::value,
\"signed form of 'unsigned __uint128' must be '__int128'.\");
static_assert(
sizeof(::std::hash<__int128>{}(0)) > 0, \"std::hash<__int128> is
disabled.\");
int main() { return 0; }"
HAVE_INT128_TRAITS
)
......
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