|
Boost : |
Subject: Re: [boost] Introduction of numeric_adaptor
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2009-11-02 13:51:34
On Sun, Nov 1, 2009 at 4:16 PM, Bruno Lalande <bruno.lalande_at_[hidden]> wrote:
>
> Example:
>
> template <class T>
> T my_robustness_sensitive_function(T value)
> {
> value /= 2;
> T value2 = boost::to<T>("123.0123456789");
using boost::sqrt;
value += sqrt(value2);
> return value;
> };
>
This will get a sqrt(T) if defined, else boost::sqrt(T).
Not sure about the to<> - it is a bit small/ambiguous to not have a namespace.
Tony
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk