## Problem
In the case of an existing `fmt` namespace (in my project this looks like `Project::fmt`) it is possible to get a namespace clash in debug builds (MSVC 2017)
## Proposed Solution
When referencing `fmt` internally, be explicit that it is relative to the global namespace using `::fmt`
The nvcc compiler (at least up to 9.2) defines `__SIZEOF_INT128__`, but doesn't support 128-bit integers on device code:
```
error: "fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<char>>, char>, const char *, int, const char *>" contains a 128-bit integer, which is not supported in device code
```
The `std::is_base_of<T,U>()` and `std::is_reference<T>()` member functions were added in C++14. To maintain C++11 compatibility, use the `::value` instead.
Current code fails on intel-17 and other compilers if using strict C++11
The intel-17 and intel-18 compilers seem to require that `u` be `const`:
```
/src/fmt/format.h(226): warning #437: reference to local variable of enclosing function is not allowed
char data[sizeof(u)];
```
If `u` is declared as `const auto u =1u` instead of just `auto u=1u`, the file compiles with no warnings.
Similar to the MSC Compiler, the NVidia NVCC compiler also
emits unreachable code warnings when there is a return
statement following an exception. These changes eliminate
those warnings.
* Squelch MSVC warning exporting subclasses of runtime_error
When compiling {fmt} as a DLL, MSVC complains that we are exporting
classes that inherit from "std::runtime_error", which we are not
exporting.
In this case, it's not really a problem because that symbol is already
exported via the C++ stdlib. So we just add a pragma to silence the
warning.
* Fix compilation with MinGW
Commit 3bc28fcc6b ("Squelch MSVC warning exporting subclasses of
runtime_error", 2019-11-29) silenced a MSVC warning under. The MinGW
compiler also defines _WIN32, but does not support the "warning" pragma.
Introduce a helper macro to squelch the MSVC warning only when using the
Microsoft compiler.
Signed-off-by: Beat Bolli <dev@drbeat.li>
* Fix compilation with VS2015 (#1450)
VS2015 does not support the __pragma(...) syntax in the midst of a
class declaration, so move it to just before the declaration.