<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">susumu.yata <susum****@gmail*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2013-06-20 20:37:33 +0900 (Thu, 20 Jun 2013)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd">3f231732af9234b533d822e1f3ff7e2c7b2ca1cd</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Update bit_scan_forward/reverse() to support signed integers.</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#diff-0">lib/grnxx/intrinsic.hpp</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/grnxx/intrinsic.hpp (+10 -10)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L150">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L151">151</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L152">152</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L153">153</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L154">154</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L155">155</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L156">156</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L157">157</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L158">158</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L159">159</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L160">160</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L161">161</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L162">162</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L163">163</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L164">164</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L165">165</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L166">166</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L167">167</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L168">168</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L216">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L217">217</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L218">218</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L219">219</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L220">220</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L221">221</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L222">222</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L223">223</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L224">224</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L225">225</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L226">226</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L227">227</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0L228">228</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R150">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R151">151</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R152">152</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R153">153</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R154">154</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R155">155</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R156">156</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R157">157</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R158">158</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R159">159</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R160">160</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R161">161</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R162">162</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R163">163</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R164">164</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R165">165</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R166">166</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R167">167</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R168">168</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R216">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R217">217</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R218">218</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R219">219</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R220">220</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R221">221</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R222">222</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R223">223</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R224">224</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R225">225</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R226">226</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R227">227</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/grnxx/commit/3f231732af9234b533d822e1f3ff7e2c7b2ca1cd#L0R228">228</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -151,18 +151,18 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">class BitScanReverse<8> {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> template <typename Value></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> inline uint8_t bit_scan_reverse(Value value) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- static_assert(std::is_integral<Value>::value &&</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- std::is_unsigned<Value>::value,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- "bit_scan_reverse accepts only unsigned integer types");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ static_assert(std::is_integral<Value>::value,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "bit_scan_reverse accepts only integer types");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ using UValue = typename std::make_unsigned<Value>::type;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #if defined(GRNXX_MSC) || defined(GRNXX_HAS_GNUC_BUILTIN_CLZ)</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return BitScanReverse<sizeof(Value)>()(value);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return BitScanReverse<sizeof(Value)>()(static_cast<UValue>(value));</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #else // defined(GRNXX_MSC) || defined(GRNXX_HAS_GNUC_BUILTIN_CLZ)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> uint8_t result = 0;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> for (uint8_t shift = static_cast<uint8_t>(sizeof(Value) * 4);</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> shift != 0; shift /= 2) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- if ((value >> shift) != 0) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- value >>= shift;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if ((static_cast<UValue>(value) >> shift) != 0) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ value = static_cast<UValue>(value) >> shift;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> result += shift;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -217,12 +217,12 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">class BitScanForward<8> {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> template <typename Value></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> inline uint8_t bit_scan_forward(Value value) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- static_assert(std::is_integral<Value>::value &&</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- std::is_unsigned<Value>::value,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- "bit_scan_forward accepts only unsigned integer types");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ static_assert(std::is_integral<Value>::value,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "bit_scan_forward accepts only integer types");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ using UValue = typename std::make_unsigned<Value>::type;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #if defined(GRNXX_MSC) || defined(GRNXX_HAS_GNUC_BUILTIN_CLZ)</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return BitScanForward<sizeof(Value)>()(value);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return BitScanForward<sizeof(Value)>()(static_cast<UValue>(value));</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #else // defined(GRNXX_MSC) || defined(GRNXX_HAS_GNUC_BUILTIN_CLZ)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> uint8_t result = static_cast<uint8_t>(sizeof(Value) * 8) - 1;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> for (uint8_t shift = static_cast<uint8_t>(sizeof(Value) * 4);</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>