26 Jan
2008
26 Jan
'08
4:59 p.m.
On Sat, Jan 26, 2008 at 08:50:42AM -0800, chun ping wang wrote:
Hi is their anyway for boost to allow only explicit conversion...
Why not just use a method?
like class MyInt { // some code inside.... int to_int() const; };
myIntCalc(int, int);
MyInt a, b; f = myInt(a, b); // compile error no implicit conversion.
int x = boost::numeric_cast<int>(a); // k allow
int x = a.to_int();