
17 Dec
2005
17 Dec
'05
1:48 p.m.
Thorsten Ottosen wrote:
Eric Niebler wrote:
Here's my latest attempt. This works on gcc 3.4.4 (cygwin), but not on VC7.1 or (sadly) Comeau Online. Language lawyers, start your engines!
Now it works on vc7.1 too. Not como.
Btw, the error on como is down to one, name the line char t1[!IS_RVALUE(f1)]; (remember to compile with --a or --A) To unconfuse the compiler, one might try to add another utility: template< class T > struct ref_probe { operator T&(); }; template<class T > ref_probe<T> make_probe( T& ); now the conversions from probe<T> should only happen for const T& and T(). -Thorsten