cause i want to use it in a generic function and other numeric type your_int may or not have to_int...
On Sat, Jan 26, 2008 at 08:50:42AM -0800, chun ping wang wrote:Why not just use a method?
>
> Hi is their anyway for boost to allow only explicit conversion...
>int to_int() const;
> like class MyInt
> {
> // some code inside....
> };int x = a.to_int();
>
> myIntCalc(int, int);
>
> MyInt a, b;
> f = myInt(a, b); // compile error no implicit conversion.
>
>
> int x = boost::numeric_cast<int>(a); // k allow
>
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users