-
Notifications
You must be signed in to change notification settings - Fork 63
/
typeinfo.h
36 lines (31 loc) · 1.3 KB
/
typeinfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// This file is part of the uSTL library, an STL implementation.
//
// Copyright (c) 2005 by Mike Sharov <[email protected]>
// This file is free software, distributed under the MIT License.
#pragma once
#ifndef WITHOUT_LIBSTDCPP
#include <typeinfo>
#else
#include "uexception.h"
namespace __cxxabiv1 { class __class_type_info; }
namespace std {
class type_info {
public:
inline virtual ~type_info (void) { }
inline const char* name (void) const { return (__name[0] == '*' ? __name + 1 : __name); }
inline bool before (const type_info& v) const { return (__name < v.__name); }
inline bool operator==(const type_info& v) const { return (__name == v.__name); }
inline bool operator!=(const type_info& v) const { return (!operator==(v)); }
virtual bool __is_pointer_p (void) const;
virtual bool __is_function_p (void) const;
virtual bool __do_catch (const type_info* __thr_type, void** __thr_obj, unsigned __outer) const;
virtual bool __do_upcast (const __cxxabiv1::__class_type_info* __target, void** __obj_ptr) const;
explicit inline type_info (const char* newname) : __name(newname) { }
private:
inline void operator= (const type_info&) { }
inline type_info (const type_info&) { }
protected:
const char* __name;
};
} // namespace std
#endif