From 93652ed81fb1aca85eebed6027e5ff95bff56dcf Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 7 Jun 2015 15:49:08 +0100 Subject: [PATCH] fix octa::MapRange func type checks for regular functors --- octa/algorithm.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/octa/algorithm.h b/octa/algorithm.h index a712fb8..bcf2735 100644 --- a/octa/algorithm.h +++ b/octa/algorithm.h @@ -445,35 +445,36 @@ namespace detail { }; template::value && - octa::IsMoveConstructible::value + bool = MapFuncTest::value > struct MapFuncTypeObjBase { typedef octa::Function)> Type; }; template struct MapFuncTypeObjBase { - typedef F Type; + typedef MapLambdaRet(*Type)(MapLambdaArg); }; - template::value> - struct MapFuncTypeObj { + template::value && + octa::IsMoveConstructible::value + > struct MapFuncTypeObj { typedef typename MapFuncTypeObjBase::Type Type; }; template struct MapFuncTypeObj { - typedef MapLambdaRet(*Type)(MapLambdaArg); + typedef F Type; }; template::value> struct MapFuncType { - typedef typename MapFuncTypeObj::Type Type; + typedef F Type; }; template - struct MapFuncType { - typedef F Type; + struct MapFuncType { + typedef typename MapFuncTypeObj::Type Type; }; }