mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-07 08:31:16 +00:00
Improve FMT_ALWAYS_INLINE (#1878)
1. FMT_ALWAYS_INLINE should imply inline; otherwise, there might be linkage problems 2. Add specialization for MSVC (__forceinline)
This commit is contained in:
parent
7e6827521a
commit
d55e61f120
@ -870,8 +870,10 @@ template <> int count_digits<4>(detail::fallback_uintptr n);
|
|||||||
|
|
||||||
#if FMT_GCC_VERSION || FMT_CLANG_VERSION
|
#if FMT_GCC_VERSION || FMT_CLANG_VERSION
|
||||||
# define FMT_ALWAYS_INLINE inline __attribute__((always_inline))
|
# define FMT_ALWAYS_INLINE inline __attribute__((always_inline))
|
||||||
|
#elif FMT_MSC_VER
|
||||||
|
# define FMT_ALWAYS_INLINE __forceinline
|
||||||
#else
|
#else
|
||||||
# define FMT_ALWAYS_INLINE
|
# define FMT_ALWAYS_INLINE inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FMT_BUILTIN_CLZ
|
#ifdef FMT_BUILTIN_CLZ
|
||||||
|
Loading…
Reference in New Issue
Block a user