Peng Yu:
On Wed, Oct 22, 2008 at 9:28 PM, Steven Watanabe
wrote: AMDG
Peng Yu wrote:
Because of a bug in GCC, BOOST_TYPEOF (which essentially is a macro for 'typeof') does not work for the attached code. I tried GCC 4.1.1, somebody else tried GCC 4.3.0. Neither of them work for the attached code.
What attached code?
Sorry, I forgot to attach the code. Here is the attached code.
This is not what Steven meant. It was probably the use of the term "traits"
that threw you away. multiply_traits is not a traits class; it's just an
implementation detail that places a level of indirection between typeof and
the signature.
Wherever you need to use
BOOST_TYPEOF( T1() * T2() )
in a function signature, you replace it with
typename multiply_helper