mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-14 10:39:05 +00:00
fix testspr/typeinfo.hpp: <cxxabi.h> workaround
This commit is contained in:
parent
6bd876c587
commit
bbbf484a24
1 changed files with 13 additions and 4 deletions
|
@ -1,12 +1,21 @@
|
||||||
#ifndef TESTSPR_TYPEINFO_HPP
|
#ifndef TESTSPR_TYPEINFO_HPP
|
||||||
#define TESTSPR_TYPEINFO_HPP
|
#define TESTSPR_TYPEINFO_HPP
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
//
|
||||||
# include <cstdlib>
|
// TESTSPR_HAS_CXXABI_H
|
||||||
|
//
|
||||||
|
#if defined(__clang__)
|
||||||
|
# if defined(__has_include) && __has_include(<cxxabi.h>)
|
||||||
|
# define TESTSPR_HAS_CXXABI_H
|
||||||
|
# endif
|
||||||
|
#elif defined(__GNUC__) && !defined(__QNX__)
|
||||||
|
# define TESTSPR_HAS_CXXABI_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#if defined(__GNUC__)
|
#ifdef TESTSPR_HAS_CXXABI_H
|
||||||
|
# include <cstdlib>
|
||||||
# include <cxxabi.h>
|
# include <cxxabi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -23,7 +32,7 @@ namespace testspr {
|
||||||
//
|
//
|
||||||
// typename_of
|
// typename_of
|
||||||
//
|
//
|
||||||
#if defined(__GNUC__)
|
#ifdef TESTSPR_HAS_CXXABI_H
|
||||||
namespace detail {
|
namespace detail {
|
||||||
std::string gcc_demangle(char const* mangled) {
|
std::string gcc_demangle(char const* mangled) {
|
||||||
int status;
|
int status;
|
||||||
|
|
Loading…
Reference in a new issue