Molybden API
Loading...
Searching...
No Matches
rtti.hpp
1// Copyright (c) 2000-2024 TeamDev. All rights reserved.
2// TeamDev PROPRIETARY and CONFIDENTIAL.
3// Use is subject to license terms.
4
5#ifndef MOLYBDEN_RTTI_HPP
6#define MOLYBDEN_RTTI_HPP
7
8#if defined(__clang__)
9#if __has_feature(cxx_rtti)
10#define RTTI_ENABLED
11#endif
12#elif defined(__GNUG__)
13#if defined(__GXX_RTTI)
14#define RTTI_ENABLED
15#endif
16#elif defined(_MSC_VER)
17#if defined(_CPPRTTI)
18#define RTTI_ENABLED
19#endif
20#endif
21
22namespace molybden {
23
24class RTTI {
25 public:
26 static constexpr bool Enabled() {
27#ifdef RTTI_ENABLED
28 return true;
29#else
30 return false;
31#endif
32 }
33};
34
35} // namespace molybden
36
37#endif // MOLYBDEN_RTTI_HPP
Definition rtti.hpp:24