Apply clang-format and update inclusion guards

This commit is contained in:
Victor Zverovich 2019-12-18 11:05:31 -08:00
parent 6100ed4bb3
commit 2201890d7a
3 changed files with 9 additions and 7 deletions

View File

@ -117,8 +117,10 @@
# endif
#endif
// [[noreturn]] is disabled on MSVC and NVCC because of bogus unreachable code warnings.
#if FMT_EXCEPTIONS && FMT_HAS_CPP_ATTRIBUTE(noreturn) && !FMT_MSC_VER && !FMT_NVCC
// [[noreturn]] is disabled on MSVC and NVCC because of bogus unreachable code
// warnings.
#if FMT_EXCEPTIONS && FMT_HAS_CPP_ATTRIBUTE(noreturn) && !FMT_MSC_VER && \
!FMT_NVCC
# define FMT_NORETURN [[noreturn]]
#else
# define FMT_NORETURN
@ -208,7 +210,7 @@
FMT_BEGIN_NAMESPACE
// Implementations of enable_if_t and other types for pre-C++14 systems.
// Implementations of enable_if_t and other metafunctions for pre-C++14 systems.
template <bool B, class T = void>
using enable_if_t = typename std::enable_if<B, T>::type;
template <bool B, class T, class F>

View File

@ -90,7 +90,7 @@
FMT_BEGIN_NAMESPACE
namespace internal {
template <typename Exception> inline void do_throw(const Exception& x) {
// Silence unreachable code warnings in MSVC and NVCC because these
// Silence unreachable code warnings in MSVC and NVCC because these
// are nearly impossible to fix in a generic code.
volatile bool b = true;
if (b) throw x;

View File

@ -5,8 +5,8 @@
//
// For the license information refer to format.h.
#ifndef FMT_POSIX_H_
#define FMT_POSIX_H_
#ifndef FMT_OS_H_
#define FMT_OS_H_
#if defined(__MINGW32__) || defined(__CYGWIN__)
// Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/.
@ -397,4 +397,4 @@ class Locale {
#endif // FMT_LOCALE
FMT_END_NAMESPACE
#endif // FMT_POSIX_H_
#endif // FMT_OS_H_