|
Boost : |
Subject: Re: [boost] [review] Multiprecision review (June 8th - 17th, 2012)
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-06-27 03:59:08
>Do we need an eval_set() that is callable from the "detail" layer?
Nope, there's already an operator= for all the backends, but the argument
must be a type listed in one of the backends typelists, so the fix is:
// Find the type as wide as U that T is assignable from:
typedef typename boost::multiprecision::detail::canonical<U, T>::type
int_type;
// This will store the result.
if(U(p % U(2)) != U(0))
{
result = t;
}
else
result = int_type(1);
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk