This makes attribute_value and lexical_cast use the "new" to/from_chars api.
Its main advantages are:
- It's guaranteed to be locale independent, hopefully fixing all cases of #3945 and similar
- It fixes some cases config serialization, in particular the test
```
cfg["x"] = "9.87654321";
BOOST_CHECK_EQUAL(cfg["x"], 9.87654321);
```
- Previously the lexical_cast implementation used exception
handling for invalid formats (catching std::invalid_argument)
which made noise during debugging (and is also slower if it
is not optimized out).
- It's faster
So far afaik the only compiler which has a complete and proper to/from_chars implementation is msvc, gccs implementation of from_chars sometimes uses strtod under the hood and clang simply hasn't implemented from_chars for floating point numbers yet at all (actually the upcomig clang 20 will have it). Luckily for us, there is now also boost::charconv that can be used. So this raises to minimum build requirement to have at least one of:
- msvc 2019 update 5
- gcc 11
- clang 14 (i have added a fallback implementation of from_chars for this case, that doesn't support all of its features, and is probably certainly not as fast as the boost version, but supports the features that we use from it)
- boost 1.85
Since in particular the gcc implementation isn't that good (at least it on gcc11), boost charconv is the preferred implementation that is used if available.
This also removes a strange overload for
pointers to integers in lexical_cast while changing lexical_cast to use the new api.
* Convert server_base class to use coroutine instead of handlers
* Rework wesnothd's client login to use coroutine
* Merge 3 player handling functions into a single coroutine
* update cmakelists too
* Implement send_doc_queued in terms of coroutine
* Use brace initialization for making asio buffers
* Implement campaignd's request handling in coroutine
* Brace-initialize entire vector
* Remove old handler based send/receive helpers
* Document coroutine send/receive helpers
* Made coro_send_doc() helper take wml doc by reference
In most cases there is no need to rely on shared pointers to ensure
object lifetime if using coroutines since even when coroutine is
suspended args are still kept alive by its context.
* Document coro_send_file()
* Silence deprecation warning to fix build on earlier versions of boost
* Explicitly check for boost.context to allow linking against static boost libs
* Add boost.coroutine to flatpak manifest
* Port winapi TransmitFile codepath to coroutines
* Exception safety fix
* Add boost.scope_exit to vcpkg
* Fix build with pre-1.66 boost
* Move coro_* helpers into server_base class
Those helpers were in .ipp solely because they were templated on handler
types, this is no longer true after coroutine based rework.
* Make server_base::coro_send_file non-inline
* CleanUp Xcode project
Co-authored-by: Martin Hrubý (hrubymar10) <hrubymar10@gmail.com>