Fix `Wreorder-ctor` warning
```
spdlog/pattern_formatter-inl.h:1028:7: error: field 'custom_handlers_' will be initialized after field 'need_localtime_' [-Werror,-Wreorder-ctor]
, custom_handlers_(std::move(custom_user_flags))
^
```
Move the initialization of `need_localtime_(true)` right after `pattern_time_type_` as expected.
spdlog::level::level_enum cannot be forward-declared at present, as
the definition does not specify an underlying type.
To allow users to make use of <spdlog/fwd.h> to refer to
level::level_enum without pulling in all of <spdlog/common.h> (which
can be quite costly), specify an underlying type (int) for
level::level_enum, then add a forward-declaration for it to
spdlog/fwd.h.
Note this required explicitly casting level_enum to size_t within ansicolor_sink due to sign-conversion errors:
implicit conversion changes signedness: 'const level::level_enum' to 'std::__1::array::size_type' (aka 'unsigned long') [-Wsign-conversion]
It would appear that an enum with an unspecified underlying type is in
some kind of superposition - it can be treated as both signed _and_
unsigned - using an underlying type of 'unsigned int' triggers even
more warnings of this kind...
`std::span` does not have `const_iterator`. this prevents `to_hex` from
being used with `std::span<>`. to fix this, we provide an explicit
overload.
compare: https://cplusplus.github.io/LWG/issue3320
When trying to use spdlog/fmt/bin_to_hex.h in the same compile unit as spdlog/fmt/bundled/ranges.h you got a compile error because there was a multiple definitions for iterable classes. This fix renames the begin() and end() getters in dump_info into getBegin()/getEnd() in order to avoid this collision.
Added an example of ranges in example.cpp to show that it actually works (an to_hex example was already there)