Add option to force usage of inline namespaces

Detection of inline namespaces is imperfect as some compilers
don't provide __has_feature

This option allows to override it if needed.
This commit is contained in:
darklukee
2020-10-21 09:45:41 +02:00
committed by Victor Zverovich
parent e57ec7d563
commit 280b5612c0

View File

@ -178,9 +178,17 @@
# endif # endif
#endif #endif
#ifndef FMT_BEGIN_NAMESPACE #ifndef FMT_USE_INLINE_NAMESPACES
# if FMT_HAS_FEATURE(cxx_inline_namespaces) || FMT_GCC_VERSION >= 404 || \ # if FMT_HAS_FEATURE(cxx_inline_namespaces) || FMT_GCC_VERSION >= 404 || \
(FMT_MSC_VER >= 1900 && !_MANAGED) (FMT_MSC_VER >= 1900 && !_MANAGED)
# define FMT_USE_INLINE_NAMESPACES 1
# else
# define FMT_USE_INLINE_NAMESPACES 0
# endif
#endif
#ifndef FMT_BEGIN_NAMESPACE
# if FMT_USE_INLINE_NAMESPACES
# define FMT_INLINE_NAMESPACE inline namespace # define FMT_INLINE_NAMESPACE inline namespace
# define FMT_END_NAMESPACE \ # define FMT_END_NAMESPACE \
} \ } \