
2 Nov
2009
2 Nov
'09
6:51 p.m.
On Sun, Nov 1, 2009 at 4:16 PM, Bruno Lalande <bruno.lalande@gmail.com> 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