On Wed, Oct 8, 2025 at 2:26 PM Matt Borland via Boost <boost@lists.boost.org> wrote:
We discuss the rationale for absence of any operation besides explicit conversion between binary floating point and decimal floating point in the design decisions page [1]. I don't entirely remember why Integers are allowed implicit conversion, but that should probably be made explicit too.
I do not understand why construction from integer should be explicit for types that can perfectly represent the integer in type. So I do understand that decimal32 can *not* represent all values of int64 without rounding, so implicit is bad. But if somebody wants to construct decimal128 from int64 or decimal64 from uint32_t do we really want to burden that user with spam? I know conditional explicit requires C++20 for clean solution but other less nice <https://devblogs.microsoft.com/cppblog/c20s-conditionally-explicit-constructors/> solutions are possible in older standards. So I strongly suggest allowing implicit construction when no rounding can occur.