aboutsummaryrefslogtreecommitdiff
path: root/MoonParser/pegtl/internal/demangle.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'MoonParser/pegtl/internal/demangle.hpp')
-rw-r--r--MoonParser/pegtl/internal/demangle.hpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/MoonParser/pegtl/internal/demangle.hpp b/MoonParser/pegtl/internal/demangle.hpp
new file mode 100644
index 0000000..64efe6f
--- /dev/null
+++ b/MoonParser/pegtl/internal/demangle.hpp
@@ -0,0 +1,44 @@
1// Copyright (c) 2014-2017 Dr. Colin Hirsch and Daniel Frey
2// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
3
4#ifndef TAOCPP_PEGTL_INCLUDE_INTERNAL_DEMANGLE_HPP
5#define TAOCPP_PEGTL_INCLUDE_INTERNAL_DEMANGLE_HPP
6
7#include <string>
8#include <typeinfo>
9
10#include "../config.hpp"
11
12#if defined( __GLIBCXX__ )
13#include "demangle_cxxabi.hpp"
14#elif defined( __has_include )
15// clang-format off
16#if __has_include( <cxxabi.h> )
17// clang-format on
18#include "demangle_cxxabi.hpp"
19#else
20#include "demangle_nop.hpp"
21#endif
22#else
23#include "demangle_nop.hpp"
24#endif
25
26namespace tao
27{
28 namespace TAOCPP_PEGTL_NAMESPACE
29 {
30 namespace internal
31 {
32 template< typename T >
33 std::string demangle()
34 {
35 return demangle( typeid( T ).name() );
36 }
37
38 } // namespace internal
39
40 } // namespace TAOCPP_PEGTL_NAMESPACE
41
42} // namespace tao
43
44#endif