------- Comment #3 from sergey dot gcc at comrades dot id dot au 2007-11-09 01:14 ------- // Workaround: class a { public: template<class T> operator T &() const throw(typename ::boost::disable_if< ::boost::is_same<T, ref_t const> >::type *) { static int f; return f; } };
int main() { a const &aa = a(); // line # 27 int &i = aa; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34023