Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10982


Ignore:
Timestamp:
Dec 27, 2015, 11:07:37 PM (8 years ago)
Author:
landauf
Message:

now it's again possible to use std::type_info instead of type_index

File:
1 edited

Legend:

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

    r10981 r10982  
    117117
    118118#include <array>
    119 #include <typeindex>
    120 #include <type_traits>
    121119#include <tuple>
    122120
     
    222220
    223221            /// Returns the full identifier of the function-pointer which is defined as typeid(@a F), where @a F is the type of the stored function-pointer. Used to compare functors.
    224             virtual const std::type_index getFullIdentifier() const = 0;
     222            virtual const std::type_info& getFullIdentifier() const = 0;
    225223            /// Returns an identifier of the header of the function (doesn't include the function's class). Used to compare functors.
    226             virtual const std::type_index getHeaderIdentifier() const = 0;
     224            virtual const std::type_info& getHeaderIdentifier() const = 0;
    227225            /// Returns an identifier of the header of the function (doesn't include the function's class), but regards only the first @a params parameters. Used to compare functions if an Executor provides default-values for the other parameters.
    228             virtual const std::type_index getHeaderIdentifier(unsigned int params) const = 0;
     226            virtual const std::type_info& getHeaderIdentifier(unsigned int params) const = 0;
    229227    };
    230228
     
    387385
    388386            // see Functor::getFullIdentifier()
    389             const std::type_index getFullIdentifier() const
     387            const std::type_info& getFullIdentifier() const
    390388                { return typeid(F); }
    391389
     
    549547
    550548            // see Functor::getHeaderIdentifier()
    551             virtual const std::type_index getHeaderIdentifier() const override
     549            virtual const std::type_info& getHeaderIdentifier() const override
    552550            {
    553551                return typeid(typename detail::FunctionPointer<R, void, false, Params...>::Type);
     
    555553
    556554            // see Functor::getHeaderIdentifier(unsigned int)
    557             virtual const std::type_index getHeaderIdentifier(unsigned int params) const override
     555            virtual const std::type_info& getHeaderIdentifier(unsigned int params) const override
    558556            {
    559557                switch (params)
     
    578576            ///Helper function that deduces a parameter pack of types and returns the corresponding identifier
    579577            template<class... Types>
    580             const std::type_index getTypelistIdentifier(detail::type_list<Types...>) const
     578            const std::type_info& getTypelistIdentifier(detail::type_list<Types...>) const
    581579            {
    582580                return typeid(typename detail::FunctionPointer<R, void, false, Types...>::Type);
Note: See TracChangeset for help on using the changeset viewer.