$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [numeric conversation] behavior on std::numeric_limits<double>::max() + eps with numeric_cast
From: Brandon Kohn (blkohn_at_[hidden])
Date: 2014-06-09 08:06:01
On 6/9/2014 02:53 AM, Olaf Peter wrote:
> std::cout << boost::numeric_cast<double>(z) << '\n';
>
> I would expect that an exception is thrown which isn't, the output is
> 1.79769e+308
> 1.79769e+308
In the case of conversion to the same type I believe a trivial fall
through is done which just returns the value, so this is the expected
behavior.
>
> and as second: If I write my onw UDT as shown in the tutorial like:
>
> it doesn't change the result - is this the right way?
>
It's hard for me to tell just from the code snippets you've provided.
Could you send me a small test which shows the problem you're having?
Thanks,
Brandon Kohn