Minor consitency and comment tweaks

This commit is contained in:
Victor Zverovich 2021-07-02 13:56:37 -07:00
parent 54014e42e3
commit e461f3dbbe

View File

@ -317,9 +317,9 @@ FMT_BEGIN_NAMESPACE
FMT_MODULE_EXPORT_BEGIN
// Implementations of enable_if_t and other metafunctions for older systems.
template <bool B, class T = void>
template <bool B, typename T = void>
using enable_if_t = typename std::enable_if<B, T>::type;
template <bool B, class T, class F>
template <bool B, typename T, typename F>
using conditional_t = typename std::conditional<B, T, F>::type;
template <bool B> using bool_constant = std::integral_constant<bool, B>;
template <typename T>
@ -333,11 +333,10 @@ struct monostate {
constexpr monostate() {}
};
// Eliminate "unused variable" warnings on all compilers. The
// `(void)var` method does not work on many intel compilers. This is
// from Herb Sutter, "Shutting up compiler warnings",
// https://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/
template <class... Ts> FMT_CONSTEXPR void ignore_unused(const Ts&...) {}
// Suppress "unused variable" warnings with the method described in
// https://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/.
// (void)var does not work on many Intel compilers.
template <typename... T> FMT_CONSTEXPR void ignore_unused(const T&...) {}
// An enable_if helper to be used in template parameters which results in much
// shorter symbols: https://godbolt.org/z/sWw4vP. Extra parentheses are needed