Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 27, 2015, 8:36:21 PM (9 years ago)
Author:
landauf
Message:

getHeaderIdentifier(): return the typeid of the actual function pointer instead of FunctorHeaderIdentifier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/command/Functor.h

    r10979 r10980  
    407407        template <bool isconst, class... Params>                           struct FunctorCaller<void, void, isconst, Params...>        { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, Params...>::Type functionPointer, void*, const Params&... parameters)  { (*functionPointer)(parameters...); return MultiType::Null; } };
    408408
    409         // Helper class, used to identify the header of a function-pointer (independent of its class)
    410         template <class R, class... Params>
    411         struct FunctorHeaderIdentifier
    412         {};
    413 
    414409        // Helper class to determine if a function has a returnvalue
    415410        template <class T>
     
    529524            virtual const std::type_index getHeaderIdentifier() const override
    530525            {
    531                 return typeid(detail::FunctorHeaderIdentifier<R, Params...>);
     526                return typeid(typename detail::FunctionPointer<R, void, false, Params...>::Type);
    532527            }
    533528
     
    564559            const std::type_index getTypelistIdentifier(detail::type_list<Types...>) const
    565560            {
    566                 return typeid(detail::FunctorHeaderIdentifier<R, Types...>);
     561                return typeid(typename detail::FunctionPointer<R, void, false, Types...>::Type);
    567562            }
    568563    };
Note: See TracChangeset for help on using the changeset viewer.