[Orxonox-commit 6325] r10982 - code/branches/cpp11_v2/src/libraries/core/command
landauf at orxonox.net
landauf at orxonox.net
Sun Dec 27 23:07:37 CET 2015
Author: landauf
Date: 2015-12-27 23:07:37 +0100 (Sun, 27 Dec 2015)
New Revision: 10982
Modified:
code/branches/cpp11_v2/src/libraries/core/command/Functor.h
Log:
now it's again possible to use std::type_info instead of type_index
Modified: code/branches/cpp11_v2/src/libraries/core/command/Functor.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/Functor.h 2015-12-27 22:04:09 UTC (rev 10981)
+++ code/branches/cpp11_v2/src/libraries/core/command/Functor.h 2015-12-27 22:07:37 UTC (rev 10982)
@@ -116,8 +116,6 @@
#include "core/CorePrereqs.h"
#include <array>
-#include <typeindex>
-#include <type_traits>
#include <tuple>
#include "util/Output.h"
@@ -221,11 +219,11 @@
virtual void setSafeMode(bool bSafeMode) = 0;
/// 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.
- virtual const std::type_index getFullIdentifier() const = 0;
+ virtual const std::type_info& getFullIdentifier() const = 0;
/// Returns an identifier of the header of the function (doesn't include the function's class). Used to compare functors.
- virtual const std::type_index getHeaderIdentifier() const = 0;
+ virtual const std::type_info& getHeaderIdentifier() const = 0;
/// 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.
- virtual const std::type_index getHeaderIdentifier(unsigned int params) const = 0;
+ virtual const std::type_info& getHeaderIdentifier(unsigned int params) const = 0;
};
/**
@@ -386,7 +384,7 @@
{ return this->functionPointer_; }
// see Functor::getFullIdentifier()
- const std::type_index getFullIdentifier() const
+ const std::type_info& getFullIdentifier() const
{ return typeid(F); }
protected:
@@ -548,13 +546,13 @@
}
// see Functor::getHeaderIdentifier()
- virtual const std::type_index getHeaderIdentifier() const override
+ virtual const std::type_info& getHeaderIdentifier() const override
{
return typeid(typename detail::FunctionPointer<R, void, false, Params...>::Type);
}
// see Functor::getHeaderIdentifier(unsigned int)
- virtual const std::type_index getHeaderIdentifier(unsigned int params) const override
+ virtual const std::type_info& getHeaderIdentifier(unsigned int params) const override
{
switch (params)
{
@@ -577,7 +575,7 @@
///Helper function that deduces a parameter pack of types and returns the corresponding identifier
template<class... Types>
- const std::type_index getTypelistIdentifier(detail::type_list<Types...>) const
+ const std::type_info& getTypelistIdentifier(detail::type_list<Types...>) const
{
return typeid(typename detail::FunctionPointer<R, void, false, Types...>::Type);
}
More information about the Orxonox-commit
mailing list