Fix for older versions of intel compiler

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.
This commit is contained in:
Greg Sjaardema 2020-01-14 08:50:17 -07:00 committed by Victor Zverovich
parent 77165fdf85
commit ae3ea156ea

View File

@ -235,7 +235,7 @@ inline Dest bit_cast(const Source& source) {
}
inline bool is_big_endian() {
auto u = 1u;
const auto u = 1u;
struct bytes {
char data[sizeof(u)];
};