Developer documentation

texp_demangle.hpp
Go to the documentation of this file.
1 #ifndef realroot_BASE_TYPE_DEMANGLE_H
2 #define realroot_BASE_TYPE_DEMANGLE_H
3 
4 namespace mmx {
5 
6 namespace texp
7 {
8  template<class X> inline
9  const char * name() {
10  size_t len;
11  int status;
12  return abi::__cxa_demangle( typeid(X).name(), 0, &len, &status );
13  };
14 
15  template<class X> inline
16  std::ostream& print( std::ostream& o )
17  {
18  size_t len;
19  int status;
20  o << abi::__cxa_demangle( typeid(X).name(), 0, &len, &status );
21  return o;
22  };
23 
24 
25  template<class X>
26  struct TYPE {};
27  template<class X>
28  inline std::ostream & operator<<( std::ostream& o, const TYPE<X>& t )
29  {
30  return print<X>( o );
31  };
32 };
33 
34 }// end namespace mmx
35 
36 #endif
TMPL X
Definition: polynomial_operators.hpp:148
Definition: texp_demangle.hpp:26
const char * name()
Definition: texp_demangle.hpp:9
Definition: array.hpp:12
std::ostream & print(std::ostream &o)
Definition: texp_demangle.hpp:16
Home