Skip to content

Commit

Permalink
Templatized base types now work with mock_interface
Browse files Browse the repository at this point in the history
When using a template base class as the parameter to `mock_interface`, the `IMPLEMENT_MOCKn()`
macros fail to compile due to `typename` missing before the `decltype(..)::type` statement.

Fixes #116

Signed-off-by: Robert Dailey <[email protected]>
  • Loading branch information
rcdailey committed Jan 29, 2019
1 parent 1029238 commit 7d2f00a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/trompeloeil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4224,9 +4224,9 @@ template <typename T>
TROMPELOEIL_IMPLEMENT_CONST_MOCK_(15, name)

#define TROMPELOEIL_IMPLEMENT_MOCK_(num, name) \
TROMPELOEIL_MAKE_MOCK_(name,,num, decltype(::trompeloeil::nonconst_member_signature(&trompeloeil_interface_name::name))::type,override,)
TROMPELOEIL_MAKE_MOCK_(name,,num, typename decltype(::trompeloeil::nonconst_member_signature(&trompeloeil_interface_name::name))::type,override,)
#define TROMPELOEIL_IMPLEMENT_CONST_MOCK_(num, name) \
TROMPELOEIL_MAKE_MOCK_(name,const,num, decltype(::trompeloeil::const_member_signature(&trompeloeil_interface_name::name))::type,override,)
TROMPELOEIL_MAKE_MOCK_(name,const,num, typename decltype(::trompeloeil::const_member_signature(&trompeloeil_interface_name::name))::type,override,)

#define TROMPELOEIL_MAKE_MOCK_(name, constness, num, sig, spec, ...) \
using TROMPELOEIL_LINE_ID(cardinality_match) = \
Expand Down

0 comments on commit 7d2f00a

Please sign in to comment.