C++20 module support
Adds support for import boost.charconv.
This pull request is intended to get feedback and support discussion in the ML. It depends on changes in Boost.CMake, Boost.Core, Boost.ThrowException and Boost.Assert that aren't in develop.
Any feedback is welcome.
Codecov Report
Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
Project coverage is 94.85%. Comparing base (
dacb62a) to head (65e5356).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...st/charconv/detail/fast_float/digit_comparison.hpp | 50.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #255 +/- ##
========================================
Coverage 94.85% 94.85%
========================================
Files 69 69
Lines 9077 9077
========================================
Hits 8610 8610
Misses 467 467
| Files with missing lines | Coverage Δ | |
|---|---|---|
| include/boost/charconv/detail/apply_sign.hpp | 100.00% <ø> (ø) |
|
| include/boost/charconv/detail/buffer_sizing.hpp | 100.00% <ø> (ø) |
|
| include/boost/charconv/detail/compute_float32.hpp | 100.00% <ø> (ø) |
|
| include/boost/charconv/detail/compute_float64.hpp | 74.07% <ø> (ø) |
|
| include/boost/charconv/detail/compute_float80.hpp | 91.30% <ø> (ø) |
|
| ...lude/boost/charconv/detail/dragonbox/dragonbox.hpp | 97.68% <ø> (ø) |
|
| ...ost/charconv/detail/dragonbox/dragonbox_common.hpp | 100.00% <ø> (ø) |
|
| include/boost/charconv/detail/dragonbox/floff.hpp | 87.10% <ø> (ø) |
|
| include/boost/charconv/detail/emulated128.hpp | 100.00% <100.00%> (ø) |
|
| ...nclude/boost/charconv/detail/fallback_routines.hpp | 84.61% <ø> (ø) |
|
| ... and 51 more |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update dacb62a...65e5356. Read the comment docs.
This is cool progress. Thanks for continuing to plug away on it.
I think, instead of adding a bunch of headers in include/boost/config/std, a different approach would be better.
Add a new macro in Boost.Config:
#if defined(BOOST_USE_MODULES)
#define BOOST_STD_HEADER(x) <boost/config/detail/import_std.hpp>
#else
#define BOOST_STD_HEADER(x) <x>
#endif
and a new boost/config/detail/import_std.hpp header:
#ifndef BOOST_CONFIG_DETAIL_IMPORT_STD_HPP_INCLUDED_
#define BOOST_CONFIG_DETAIL_IMPORT_STD_HPP_INCLUDED_
import std;
#endif // BOOST_CONFIG_DETAIL_IMPORT_STD_HPP_INCLUDED_
Then in libraries standard headers can be included as such:
#include <boost/config.hpp> // for BOOST_STD_HEADER
#include BOOST_STD_HEADER(utility)
This approach requires less maintenance and is forward compatible with std headers that might be added in the future.
The above assumes that BOOST_STD_HEADER and boost/config/detail/import_std.hpp are added to Boost.Config, but this doesn't have to be the case. It can be a separate Boost library, if needed.
I think I prefer the normal #include, for aesthetic reasons if nothing else.
I'm good with any of the two approaches.