<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>IIU my C++ correctly, this code covers neither int64_t nor double; it covers the unsigned variety of int64 - as well as any other unsigned integer type.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">The main advantage (other than not relying on implicit promotions) would be that if someone writes their new integral data type (BigNum), and mark it with the appropriate traits, it would Just Work<br><br><div style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><i>- Enrico</i></div><span style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); ">Sent from my iPhone</span></div><div><br>On Dec 3, 2015, at 9:34 AM, Greg Clayton <<a href="mailto:clayborg@gmail.com">clayborg@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>clayborg added a comment.</span><br><span></span><br><span>Everything looks good, just wondering why we need the template code? See inlined comments.</span><br><span></span><br><span></span><br><span>================</span><br><span>Comment at: include/lldb/Utility/JSON.h:102-104</span><br><span>@@ +101,5 @@</span><br><span>+</span><br><span>+        template <typename T,</span><br><span>+                  typename std::enable_if<std::is_integral<T>{} &&</span><br><span>+                                          std::is_unsigned<T>{}>::type* = nullptr></span><br><span>+        explicit JSONNumber (T u) :</span><br><span>----------------</span><br><span>What value is the template code giving us? Why can't we omit this and just have a constructor with int64_t and double?</span><br><span></span><br><span></span><br><span><a href="http://reviews.llvm.org/D15187">http://reviews.llvm.org/D15187</a></span><br><span></span><br><span></span><br><span></span><br></div></blockquote></body></html>