From 4753aa16c88d615936a0d9b035d18ed2b2c804bc Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Sat, 30 Dec 2017 16:08:31 -0800 Subject: [PATCH] Give detail functions in ConstexprMath.h decorated names Summary: [Folly] Give detail functions in `ConstexprMath.h` decorated names. So that other code also in `namespace folly::detail` which invokes the non-detail functions will result in ambiguity. Reviewed By: spalamarchuk Differential Revision: D6646313 fbshipit-source-id: 679e4cfe1c90f494acacef8b2a38a453db4d79d5 --- folly/ConstexprMath.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/folly/ConstexprMath.h b/folly/ConstexprMath.h index 34f7664e..a15f098c 100644 --- a/folly/ConstexprMath.h +++ b/folly/ConstexprMath.h @@ -105,24 +105,24 @@ constexpr auto constexpr_abs(T t) namespace detail { template -constexpr T constexpr_log2(T a, T e) { - return e == T(1) ? a : constexpr_log2(a + T(1), e / T(2)); +constexpr T constexpr_log2_(T a, T e) { + return e == T(1) ? a : constexpr_log2_(a + T(1), e / T(2)); } template -constexpr T constexpr_log2_ceil(T l2, T t) { +constexpr T constexpr_log2_ceil_(T l2, T t) { return l2 + T(T(1) << l2 < t ? 1 : 0); } } // namespace detail template constexpr T constexpr_log2(T t) { - return detail::constexpr_log2(T(0), t); + return detail::constexpr_log2_(T(0), t); } template constexpr T constexpr_log2_ceil(T t) { - return detail::constexpr_log2_ceil(constexpr_log2(t), t); + return detail::constexpr_log2_ceil_(constexpr_log2(t), t); } template -- 2.34.1