gunmetalbackupgooglecode / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

MOCK_METHOD0(Foo, Bar<X, Y>()) should compile #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The preprocessor thinks

  MOCK_METHOD0(Foo, Bar<X, Y>());

has 3 macro arguments and rejects it.  We should fix it using variadic
macros where they are supported (GCC and MSVC 8+).  We can continue to use
the existing definition where the compiler doesn't support variadic macros.

Original issue reported on code.google.com by w...@google.com on 28 Dec 2009 at 8:00

GoogleCodeExporter commented 9 years ago
I looked at the implementation, and this change doesn't seem trivial.  The 
problem is
that MOCK_METHOD* and friends are implemented using several levels of macros, 
and we
have to change all macros in the chain to be variadic s.t. the type can be 
properly
propagated.  There may be a clever way to avoid this, but it's not obvious.

Original comment by w...@google.com on 6 Jan 2010 at 5:19

GoogleCodeExporter commented 9 years ago
Doesn't seem to be worth of the high implementation complexity.

Original comment by w...@google.com on 26 Feb 2010 at 7:27