John McFarlane

Results 144 comments of John McFarlane

And yes, initialising a class template without the `` like that is [class template argument deduction](https://en.cppreference.com/w/cpp/language/class_template_argument_deduction), a C++17 feature. The best alternative is the `make_` functions in C++14.

Updated repros: * https://godbolt.org/z/Mo91EaqTe * https://godbolt.org/z/o4MdGc1ja I had to comment out some of the second on because it was timing out. Once these produce sensible results, I'll close this issue.

Updated examples: * [failing](https://godbolt.org/z/ErPnzo) * [passing](https://godbolt.org/z/xdhMa1)

Glad to hear that you're trying out the update without too much trouble. I think in this case, the problem is that `overflow_integer` is inside `elastic_integer` and not outside of...

Either of two things is happening here: 1) CNL is using too many bits or 2) CNL is not preventing overflow from happening. I think that the first is a...

(Also, [introducing](https://godbolt.org/z/eJSKhw) `wide_integer` makes up for lack of 128-bit integers although not all of the arithmetic for that type is completely solid yet so YMMV.)

Thanks for the update. As this issue has valuable reproductions, I'll keep it open until all fixes are applied. I did try removing the rounding as it requires an additional...

https://twitter.com/PatriceRoy1/status/1023574544995545088

Yup, this was a thorny decision! Division is chosen instead of right-shift because of correctness. The user will expect truncation when converting to a lower-precision number. For [https://godbolt.org/z/V1tnLh](example) ```c++ int...

Here are some different modes than can be implemented: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0105r1.html#RoundMode I doubt our desired mode is any of these because it's an exception that's applied to scaling only, i.e. conversion...