Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace Boost.MPL with Boost.MP11 #274
Legacy tests have been updated where necessary to accommodate switch to MP11.
Ready to start review process.
I will try make it easier to review/track changes and submit updates as new commits,
Two files have not been updated and it needs to be decided what to do:
The failing checksum test should now be fixed in f45dd04
It's funny how implicit namespace can make refactoring a bit more difficult :-)
@stefanseefeld Let's try. Below, I'm using references to the current implementation based on Boost.MPL so it should be easier to follow.
Consider this template:
Notice, this template which uses unqualified
Now, for the
which is 'called' during specialization of base
The Boost.MPL to Boost.MP11 convesrion in this PR replaces the
instead of this
that, for the pair of channels in the
I hope it makes sense :-)
It was well understood MPL to MP11 will propose large changeset that may be difficult if not impossible to carefully review diff by diff.
This is a big jump and, as every thorough refactoring of non-trivial codebase, it will introduce issues. So, we must continue adding more tests and more detailed tests with hope to fish for the issues - we will spend 3, 6, 9, ... months before we decide we are happy to release it.
Finally, despite of the risks, I believe this does not deteriorate any GIL qualities; on the contrary.
"You want to change things, you have to break things" :-)
I attempted to remove only those traits or some other traits (e.g. #107), but due to tight coupling of MPL and Boost.TypeTraits (and tight coupling of GIL to those two), it was not practically feasible or required some 'mapping' of traits to C++11 equivalents which would have been clear/remove-refactored again once switching to MP11.
I fished for some places where it was possible to apply C++11 features w/o breaking existing MPL-based infrastructure (e.g. #215, #225 and some more). Regardless, number of places where C++11 traits could be used directly was insignificant in comparison to size of the overall changeset required anyway.
I'm always advocate surgical strikes at code that introduce manageable diffs, but sometimes it is not feasible (esp. w/ limited time and manpower).
Build Status Update
This PR passes all these builds (compilers info in README.md):
The only failing build is the AzP one for C++17 w/ Boost 1.68 using VS2017:
I'm suspecting this is a problem with MP11 from the older release of Boost 1.68.
There is an issue in MP11 from Boost 1.68 related to fold expressions (thanks to @pdimov for confirmation). Here is MWE:
Update the Azure Pipelines builds to follow the grand rule of "test develop against develop and master against master", as the AppVeyor builds do.
Use type traits and features of C++11, then use Boost.MP11. Remove unused and unnecessary metafunctions in `detail` namespace. Remove explicit access to ::type as no longer necessary with MP11. Clean up and reformat code according to the current guidelines. Legacy tests have been updated where necessary to accommodate switch to MP11. Replace std::is_integral with gil::detail::is_channel_integral Replacing boost::is_integral with std::is_integral is C++ UB: C++11 / 20.11.2 Header <type_traits> synopsis 1 The behavior of a program that adds specializations for any of the class templates defined in this subclause is undefined unless otherwise specified.