mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
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:
parent
77165fdf85
commit
ae3ea156ea
@ -235,7 +235,7 @@ inline Dest bit_cast(const Source& source) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline bool is_big_endian() {
|
inline bool is_big_endian() {
|
||||||
auto u = 1u;
|
const auto u = 1u;
|
||||||
struct bytes {
|
struct bytes {
|
||||||
char data[sizeof(u)];
|
char data[sizeof(u)];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user