From d7e0b0d07c19369ee759fc7b5c5d37b456b08960 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Tue, 29 Jan 2019 13:59:39 -0600 Subject: [PATCH] Templatized base types now work with mock_interface 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 --- include/trompeloeil.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/trompeloeil.hpp b/include/trompeloeil.hpp index 826b059f..1636a5b7 100644 --- a/include/trompeloeil.hpp +++ b/include/trompeloeil.hpp @@ -4224,9 +4224,9 @@ template 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) = \