From cb084237125da29e396fac156b5096867f578f22 Mon Sep 17 00:00:00 2001 From: Warren Falk Date: Mon, 2 May 2016 13:04:37 -0400 Subject: [PATCH] Fix #1110, 32-bit build failure on Mac OSX (#1112) Using explicit 64-bit type in conditional in platforms above 32-bits This appears to be necessary on Mac OSX as std::conditional does not appear to short circuit and evaluates the third template arg Making the third template arg be 64 bits explicitly works around this problem and will work on both 32 bit and 64+ bit platforms. --- db/column_family.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/column_family.cc b/db/column_family.cc index cde308d8c..c531cc71e 100644 --- a/db/column_family.cc +++ b/db/column_family.cc @@ -149,7 +149,7 @@ ColumnFamilyOptions SanitizeOptions(const DBOptions& db_options, result.comparator = icmp; size_t clamp_max = std::conditional< sizeof(size_t) == 4, std::integral_constant, - std::integral_constant>::type::value; + std::integral_constant>::type::value; ClipToRange(&result.write_buffer_size, ((size_t)64) << 10, clamp_max); // if user sets arena_block_size, we trust user to use this value. Otherwise, // calculate a proper value from writer_buffer_size;