1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Revert "Add function to return full type as std::string"

This reverts commit 1cb745c8dc.
This commit is contained in:
Daniel Richtmann 2018-03-29 12:03:50 +02:00
parent 58c30c0cb1
commit 74f79c5ac7
No known key found for this signature in database
GPG Key ID: B33C490AF0772057

View File

@ -23,7 +23,6 @@ Author: Christopher Kelly <ckelly@phys.columbia.edu>
#define GRID_MATH_TRAITS_H
#include <type_traits>
#include <cxxabi.h>
namespace Grid {
@ -289,25 +288,6 @@ namespace Grid {
enum { value = sizeof(real_scalar_type)/sizeof(float) };
};
template<typename T> std::string getTypename() {
typedef typename std::remove_reference<T>::type TWoRef;
std::unique_ptr<char, void (*)(void *)> own(abi::__cxa_demangle(typeid(TWoRef).name(), nullptr, nullptr, nullptr), std::free);
std::string r = own != nullptr ? own.get() : typeid(TWoRef).name();
if(std::is_const<TWoRef>::value)
r += " const";
if(std::is_volatile<TWoRef>::value)
r += " volatile";
if(std::is_lvalue_reference<T>::value)
r += "&";
else if(std::is_rvalue_reference<T>::value)
r += "&&";
return r;
}
}
#endif