mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-26 20:20:04 +00:00
Simplify typeid check
This commit is contained in:
parent
b2106f3639
commit
686b3353aa
@ -46,16 +46,9 @@
|
|||||||
|
|
||||||
// Check if typeid is available.
|
// Check if typeid is available.
|
||||||
#ifndef FMT_USE_TYPEID
|
#ifndef FMT_USE_TYPEID
|
||||||
// In MSVC, typeid() is available with or without RTTI.
|
// __RTTI is for EDG compilers. In MSVC typeid is available without RTTI.
|
||||||
# if defined(_MSC_VER)
|
# if defined(__GXX_RTTI) || FMT_HAS_FEATURE(cxx_rtti) || FMT_MSC_VERSION || \
|
||||||
# define FMT_USE_TYPEID 1
|
defined(__INTEL_RTTI__) || defined(__RTTI)
|
||||||
# elif defined(__RTTI) // EDG compilers.
|
|
||||||
# define FMT_USE_TYPEID 1
|
|
||||||
# elif defined(__INTEL_RTTI__) // Intel compiler.
|
|
||||||
# define FMT_USE_TYPEID 1
|
|
||||||
# elif defined(__GXX_RTTI) // G++.
|
|
||||||
# define FMT_USE_TYPEID 1
|
|
||||||
# elif FMT_HAS_FEATURE(cxx_rtti) // Clang.
|
|
||||||
# define FMT_USE_TYPEID 1
|
# define FMT_USE_TYPEID 1
|
||||||
# else
|
# else
|
||||||
# define FMT_USE_TYPEID 0
|
# define FMT_USE_TYPEID 0
|
||||||
|
Loading…
Reference in New Issue
Block a user