From: Eric Ford (eford_at_[hidden])
Date: 2001-09-28 20:15:18
> However, a user might have just *forgoten* to specialize cos, even
> specific implementation exist in the UDNT package, so the asserting
> would trap his fault here.
> So I agree, an asserting default is safer, and we can provide the
> suggested to easliy introduce a specialization using double.
> Therefore, I wouldn't use overloading. I think the best choice is to
> functions with explicit signature (thus knowing exactly the type
> this way:
> return numeric_cast<TYPE>(::std::STDFUNC( numeric_cast<STDTYPE>(X)
) ) ;
> Notice that with a properly optimized numeric_cast<>, this has no
> overhead in the case were TYPE==STDTYPE.
I'm happy with both of these choices (assuming boost does adopt an
optimized numeric_cast for unnecessary conversions). I'll wait until
Kevin makes his changes. If he doesn't include these, I can.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk