C++11 on up Boost libraries

In my effort to set the meta information of 'cxxstd' for the appropriate C++11 on up libraries, my PRs for these libraries have been kindly merged to 'develop' by the library maintainers: beast callable_traits context convert coroutine2 fiber geometry gil hana histogram hof json leaf mp11 nowide outcome pfr process safe_numerics static_string stl_interfaces variant2 yap If anyone knows of any other current library which is a C++11 on up library, please tell me. My testing showed that all other Boost libraries will work in C++03 mode, but maybe I missed some other library which is a C++11 on up library. Needless to say other libraries have noted their attention to move from C++03 to C++11 in the near future. If any library does change the C++ mode necessary to use that library, I hope the maintainer(s) of that library will update the 'cxxstd' meta information appropriately. If we can get the website to work properly using the 'cxxstd' meta information, end-users should be able to know immediately whether a Boost library is usable depending on the C++ standard mode their are using.

Boost.Math has a documented minimum requirement of C++11 (but many library functions, distributions etc still work with C++03, and some new library items require C++17, and some are likely to require C++20 very soon). I'm sorry that this doesn't fit neatly into your schema ☹ Paul

On 12/30/2020 7:20 AM, Paul A Bristow via Boost wrote:
Boost.Math has a documented minimum requirement of C++11 (but many library functions, distributions etc still work with C++03, and some new library items require C++17, and some are likely to require C++20 very soon).
I'm sorry that this doesn't fit neatly into your schema ☹
I think then 'cxxstd' should be '11' for Boost.Math. Does this also need to be set for any of: Math Common Factor Math Octonian Math Quaternion Math/Special Functions Math/Statistical Distributions ?

On 30/12/2020 15:04, Edward Diener via Boost wrote:
All of them come under Boost.Math, and all are moving to C++11 in the next release (OK, so here and there stuff may work in C++03, but it won't be tested any more). Likewise Multiprecision is moving to actively require C++11 in the next release. Also Regex will deprecate C++03 in the next release - it will continue to work for a bit but the future is C++11. HTH, John.
-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

John Maddock wrote:
Math/Special Functions ...
I'm using this as an opportunity to note that I've implemented the (C++11) floating point classification and sign manipulation functions in boost/core/cmath.hpp, in order to allow libraries that only need those to no longer have a dependency on Math. E.g. https://github.com/boostorg/lexical_cast/pull/39 https://github.com/boostorg/random/pull/77 The functions in Core support C++03.

On 12/30/2020 12:12 PM, John Maddock via Boost wrote:
It is really up to the maintainers to set 'cxxstd' to whatever they feel is the minimum C++ standard level for their library. I can put in a PR for all the math libraries as "cxxstd": "11", but maintainers should set the right value for the future.
Likewise Multiprecision is moving to actively require C++11 in the next release.
Then it should be "cxxstd": "11".
Also Regex will deprecate C++03 in the next release - it will continue to work for a bit but the future is C++11.
I know you are the regex maintainer so it is your call.

Boost.config https://www.boost.org/doc/libs/1_75_0/libs/config/doc/html/index.html is used by all these libraries and may determine the cxxstd that is supported.
Math Common Factor
Is now part of Boost. Integer https://www.boost.org/doc/libs/release/libs/integer/doc/html/index.html whereas
Math Octonian Math Quaternion
Are part of Boost.Math https://www.boost.org/doc/libs/release/libs/math/doc/html/quaternions.html https://www.boost.org/doc/libs/release/libs/math/doc/html/octonions.html I believe that the above are quite mature and should still work at C++03. But many of these below are only tested at C++11 and may fail at C++03 (and others require C++14 or even C++17)
Math/Special Functions Math/Statistical Distributions
These are a useful guide, but the only certain method of determining the actual requirements for a particular program and tool chain is to try it. Paul

On 12/30/2020 12:13 PM, Paul A Bristow via Boost wrote:
Let me try again. I acknowledge that a library may have functionality where different C++ standard levels are needed to access that functionality. Still an end-user will probably want to know whether that library is mostly usable given the C++ standard level he/she is using for compilation of C++ code. That is all I am trying to establish for Boost libraries with the 'cxxstd' json field for a library's meta data. It does not mean that there is not functionality in the library which does not really need that 'cxxstd' level, or that there is not functionality in the library which needs a higher 'cxxstd' level. These things may, and probably should, be documented for that library in the official library's documentation. And of course the end-user should read the library's documentation. But I have very often found that something as basic as what C++ level is needed to use the functionality of a library, or what C++ level is needed to use just some of the functionality of a library, is extremely hard to find in most Boost library's documentation unless you know a priori where in general to look. And since Boost has perhaps wisely decided not to tell library developers exactly where in the documentation certain things should be explained, I felt that having this basic information about a minimum C++ standard level should be easily available to the end-user, where the documentation itself can explain what C++ level, or perhaps more correctly what C++ features, may be needed for other functionality in the library. I acknowledge that others may not agree that this minimum C++ standard level may not be as useful for end-users as I believe it is.

On 12/30/2020 8:47 PM, Vinnie Falco via Boost wrote:
I will not say that a Boost library is more complicated than a light bulb, because the ghost of Thomas Alva Edison as well as electrical engineers would object, but light bulb sockets have largely been standardized, at leats here in the US, whereas C++'s standardization is a moving target.

It's far worse than that - the toolchain implementations are a movable feast too! But the TL;DR answer to your question is "assume C++11", but I believe that we should also encourage would-be users to consult the regression matrix https://www.boost.org/development/tests/master/developer/summary.html for more detailed info on what is known to work with some confidence based on tests, and finally try it and see, rather than making big decisions and investments after assuming the cxxstd info is definitive. Paul PS We are steering a difficult course between trying to encourage users to use the most recent (hopefully best) compilers and Cxxstd while avoiding putting off (and losing) those who are happily using ancient compilers, and can probably continue to do so.

Wow, I have never seen that matrix before - that’s really useful - thanks for the link! Honestly, a link to that should be prominently displayed on the top boost.org page. I see it now in the development->testing, but that’s kinda buried - especially since most users aren’t looking to develop for boost itself. -hadriel

Indeed - it is quite well hidden and Google struggles to find it without exactly the right question ☹ I have the develop version bookmarked 😊 and that meets my needs. But I haven't found the equivalent for each Boost *release*. Since this contains the most detailed test results for each release, should we be keeping a copy of the regression report for master at the time of each release. Or have I not found these records yet? I believe that we should point users to these tables in the context of cxxstd support. Paul PS I note that the current https://www.boost.org/development/tests/master/developer/index.html Contains a reference to SVN health, but we have been using Git for some time now. Also the user summary link https://www.boost.org/development/tests/master/user/index.html is not working at present "Error extracting file: Error code 11 - No matching files were found." This summary is probably a more useful link - but saving for each release would be good. Should I raise a GitHub issue for this?

On 12/31/2020 12:50 PM, Paul A Bristow via Boost wrote:
Where is this URL found ? The normal links from https://www.boost.org/development/testing.html seem fine to me.

By a little light googling, I think. Perhaps it is obsolete relic and should be deleted? The normal links from https://www.boost.org/development/testing.html seem fine to me. In the past, I have found it difficult to find this page, and I believe I am not alone. That would do, except that it is not Boost release version specific. But most of all, IMO anyone asking the question "what library will work with what cxxstd? " should be urged to consult the testing pages as well as the cxxstd minimum requirement by providing a link to this page or, better, a Boost release version.

On Thu, Dec 31, 2020 at 11:50 AM Paul A Bristow via Boost < boost@lists.boost.org> wrote:
Once upon a long time ago we used to snapshot the release test results. But that: was a complicated manual process to manage for the testers and release managers, and took a bunch of disk space that wasn't available at the time. -- -- René Ferdinand Rivera Morell -- Don't Assume Anything -- No Supone Nada -- Robot Dreams - http://robot-dreams.net

I am curious, which parts of Boost.Math have a minimum requirement of C++17 or later? I could not tell from a quick glance at the github page or the docs... Can a math library consisting mostly of functions and algorithms not be written in a way to have a minimum requirement of C++11 and optionally support later standards? Best regards, Hans

Sometimes it gets difficult, so we do permit later than C++11 requirements for new submissions if there's a compelling reason. And yes, we should add some larger notes to the docs, but C++17 components include: Lanczos smoothing: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/diff0.... Empiracal cumulative distribution function: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/dist_r... Daubechies wavelets: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/daubec... Signal statistics: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/signal... Univariate statistics: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/univar... Centered continued fraction: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/intern... Condition numbers: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/cond.h... Luroth expansion: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/intern... Norms: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/math_toolkit/norms.... HTH, John. -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
participants (10)
-
Edward Diener
-
Emil Dotchevski
-
Hadriel Kaplan
-
Hans Dembinski
-
John Maddock
-
Mateusz Loskot
-
pbristow@hetp.u-net.com
-
Peter Dimov
-
René Ferdinand Rivera Morell
-
Vinnie Falco