#include class convertible { public: #if 1 template < typename U > operator U () const { // static assertions of U being acceptable type return U(); // return some computed U } #endif }; int main() { convertible c; boost::addressof( c ); // compilation error here }