> 9 Users extremely strongly prefer to write "float area = pi * r * r;"
>
> 10 There is evidence that some compilers can generate better code from
> functions like
> "double pi() { return 3.1459;}"
> but that this implies writing pi() instead of plain "long double pi".
>
> So the ()s remain the main issue.
Why won't this work:
struct Pi_impl
{
operator float() const
{ return 3.14...; }
operator double() const
{ return 3.14.................; };
operator long double() const
{ return 3.14..............................;}
};
namespace boost
{
const Pi_impl pi;
}
?
Thorsten Ottosen, AAU
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost