mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	Revert "Add function to return full type as std::string"
This reverts commit 1cb745c8dc.
			
			
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user