----- Original Message ----- From: "David Abrahams" <[EMAIL PROTECTED]>
> Thoughts? We also need this: template<class func> inline func& ambiguity_cast(func& rf) { return rf; } ...which casts away ambiguity of a function call--even by return type. Maybe add a static assertion to enforce function types. #include <iostream> namespace A { int f() { std::cout << "int A::f()" << &std::endl; return 0; } } namespace B { double f() { std::cout << "double B::f()" << &std::endl; return 0.0; } } using A::f; using B::f; int main() { ambiguity_cast<double ()>(f)(); return 0; } It also allows you to not apply explicit casts to several parameters to select the function you want: #include <iostream> int f2(int x, int y) { return x + y; } double f2(double x, double y) { return x + y; } int main() { int x = ambiguity_cast<int (int, int)>(f2)(2.5, 3.5); return 0; } ;) Paul Mensonides _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost