Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Boost 1.81.0 #87

Merged
merged 6 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2022-12-15 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Release 1.81.0-0

* inst/include/boost/*: Upgraded to Boost 1.81, as usual with two
patch sets from CRAN demands on file path length and diagnostics

* README.md: Updated package list for 1.81
* DESCRIPTION (Description): Idem

* local/scripts/CreateBoost.sh: Update for 1.81.0, added url

2022-10-31 Dirk Eddelbuettel <edd@debian.org>

* .github/workflows/ci.yaml (jobs): Update to actions/checkout@v3
Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: BH
Type: Package
Title: Boost C++ Header Files
Version: 1.78.0-0
Date: 2021-12-14
Version: 1.81.0-0
Date: 2022-12-15
Author: Dirk Eddelbuettel, John W. Emerson and Michael J. Kane
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Description: Boost provides free peer-reviewed portable C++ source
Expand All @@ -12,7 +12,7 @@ Description: Boost provides free peer-reviewed portable C++ source
for template use among CRAN packages. By placing these libraries in
this package, we offer a more efficient distribution system for CRAN
as replication of this code in the sources of other packages is
avoided. As of release 1.78.0-0, the following Boost libraries are
avoided. As of release 1.81.0-0, the following Boost libraries are
included: 'accumulators' 'algorithm' 'align' 'any' 'atomic' 'beast'
'bimap' 'bind' 'circular_buffer' 'compute' 'concept' 'config'
'container' 'date_time' 'detail' 'dynamic_bitset' 'exception'
Expand All @@ -21,7 +21,8 @@ Description: Boost provides free peer-reviewed portable C++ source
'iterator' 'lambda2' 'math' 'move' 'mp11' 'mpl' 'multiprecision'
'numeric' 'pending' 'phoenix' 'polygon' 'preprocessor' 'process'
'propery_tree' 'random' 'range' 'scope_exit' 'smart_ptr' 'sort'
'spirit' 'tuple' 'type_traits' 'typeof' 'unordered' 'utility' 'uuid'.
'spirit' 'tuple' 'type_traits' 'typeof' 'unordered' 'url' 'utility'
'uuid'.
License: BSL-1.0
URL: https://github.com/eddelbuettel/bh, https://dirk.eddelbuettel.com/code/bh.html
BugReports: https://github.com/eddelbuettel/bh/issues
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ parts or all of their functionality.

### Coverage

As of release 1.78.0-0, the following Boost libraries are included:
As of release 1.81.0-0, the following Boost libraries are included:

> accumulators algorithm align any atomic beast bimap bind circular_buffer
> compute concept config container date_time detail dynamic_bitset exception
> flyweight foreach functional fusion geometry graph heap icl integer
> interprocess intrusive io iostreams iterator lambda2 math move mp11 mpl
> multiprecision numeric pending phoenix polygon preprocessor process
> propery_tree random range scope_exit smart_ptr sort spirit tuple
> type_traits typeof unordered utility uuid
> type_traits typeof unordered url utility uuid

### Example

Expand Down
9 changes: 8 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
\newcommand{\ghit}{\href{https://github.com/eddelbuettel/bh/issues/#1}{##1}}
\newcommand{\ghpr}{\href{https://github.com/eddelbuettel/bh/pull/#1}{##1}}

\section{Changes in version 1.78.0-0 (2020-12-14)}{
\section{Changes in version 1.81.0-0 (2022-12-15)}{
\itemize{
\item Upgrade to \boost 1.81.0 (\ghpr{87})
\item Added \boostPkg{url} (new in 1.81.0)
}
}

\section{Changes in version 1.78.0-0 (2021-12-14)}{
\itemize{
\item Incremental updates to README.md and CI setup
\item Upgraded to \boost 1.78.0 (\ghpr{82} closing \ghit{80})
Expand Down
2 changes: 1 addition & 1 deletion inst/include/boost/algorithm/algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <functional> // for plus and multiplies

#include <boost/config.hpp>
#include <boost/utility/enable_if.hpp> // for boost::disable_if
#include <boost/core/enable_if.hpp> // for boost::disable_if
#include <boost/type_traits/is_integral.hpp>

namespace boost { namespace algorithm {
Expand Down
20 changes: 10 additions & 10 deletions inst/include/boost/algorithm/clamp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
#include <boost/config.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/mpl/identity.hpp> // for identity
#include <boost/utility/enable_if.hpp> // for boost::disable_if
#include <boost/type_traits/type_identity.hpp> // for boost::type_identity
#include <boost/core/enable_if.hpp> // for boost::disable_if

namespace boost { namespace algorithm {

/// \fn clamp ( T const& val,
/// typename boost::mpl::identity<T>::type const & lo,
/// typename boost::mpl::identity<T>::type const & hi, Pred p )
/// typename boost::type_identity<T>::type const & lo,
/// typename boost::type_identity<T>::type const & hi, Pred p )
/// \return the value "val" brought into the range [ lo, hi ]
/// using the comparison predicate p.
/// If p ( val, lo ) return lo.
Expand All @@ -48,17 +48,17 @@ namespace boost { namespace algorithm {
///
template<typename T, typename Pred>
BOOST_CXX14_CONSTEXPR T const & clamp ( T const& val,
typename boost::mpl::identity<T>::type const & lo,
typename boost::mpl::identity<T>::type const & hi, Pred p )
typename boost::type_identity<T>::type const & lo,
typename boost::type_identity<T>::type const & hi, Pred p )
{
// assert ( !p ( hi, lo )); // Can't assert p ( lo, hi ) b/c they might be equal
return p ( val, lo ) ? lo : p ( hi, val ) ? hi : val;
}


/// \fn clamp ( T const& val,
/// typename boost::mpl::identity<T>::type const & lo,
/// typename boost::mpl::identity<T>::type const & hi )
/// typename boost::identity<T>::type const & lo,
/// typename boost::identity<T>::type const & hi )
/// \return the value "val" brought into the range [ lo, hi ].
/// If the value is less than lo, return lo.
/// If the value is greater than "hi", return hi.
Expand All @@ -70,8 +70,8 @@ namespace boost { namespace algorithm {
///
template<typename T>
BOOST_CXX14_CONSTEXPR T const& clamp ( const T& val,
typename boost::mpl::identity<T>::type const & lo,
typename boost::mpl::identity<T>::type const & hi )
typename boost::type_identity<T>::type const & lo,
typename boost::type_identity<T>::type const & hi )
{
return boost::algorithm::clamp ( val, lo, hi, std::less<T>());
}
Expand Down
80 changes: 80 additions & 0 deletions inst/include/boost/algorithm/cxx11/copy_if.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,86 @@ copy_until ( const Range &r, OutputIterator result, Predicate p )
return boost::algorithm::copy_until (boost::begin (r), boost::end(r), result, p);
}

/// \fn copy_if_while ( InputIterator first, InputIterator last, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred )
/// \brief Copies all the elements from the input range that satisfy the
/// copy predicate to the output range while the termination predicate is
/// satisfied.
/// \return The updated output iterator
///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
/// \param result An output iterator to write the results into
/// \param copy_pred A predicate for testing whether to the current element
/// \param term_pred A predicate for testing whether to end the copy operation
template<typename InputIterator, typename OutputIterator, typename CopyPredicate, typename TerminatePred>
BOOST_CXX14_CONSTEXPR std::pair<InputIterator, OutputIterator>
copy_if_while ( InputIterator first, InputIterator last, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred)
{
for ( ; first != last && term_pred(*first); ++first ) {
if (copy_pred(*first)) {
*result++ = *first;
}
}
return std::make_pair(first, result);
}

/// \fn copy_if_while ( const Range& r, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred )
/// \brief Copies all the elements from the input range that satisfy the
/// copy predicate to the output range while the termination predicate is
/// satisfied.
/// \return The updated output iterator
///
/// \param r The input range
/// \param result An output iterator to write the results into
/// \param copy_pred A predicate for testing whether to the current element
/// \param term_pred A predicate for testing whether to end the copy operation
template<typename Range, typename OutputIterator, typename CopyPredicate, typename TerminatePred>
BOOST_CXX14_CONSTEXPR std::pair<typename boost::range_iterator<const Range>::type, OutputIterator>
copy_if_while ( const Range& r, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred)
{
return boost::algorithm::copy_if_while(boost::begin(r), boost::end(r), result, copy_pred, term_pred);
}

/// \fn copy_if_until ( InputIterator first, InputIterator last, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred )
/// \brief Copies all the elements from the input range that satisfy the
/// copy predicate to the output range until the termination predicate is
/// satisfied.
/// \return The updated output iterator
///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
/// \param result An output iterator to write the results into
/// \param copy_pred A predicate for testing whether to the current element
/// \param term_pred A predicate for testing whether to end the copy operation
template<typename InputIterator, typename OutputIterator, typename CopyPredicate, typename TerminatePred>
BOOST_CXX14_CONSTEXPR std::pair<InputIterator, OutputIterator>
copy_if_until ( InputIterator first, InputIterator last, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred)
{
for ( ; first != last && !term_pred(*first); ++first ) {
if (copy_pred(*first)) {
*result++ = *first;
}
}
return std::make_pair(first, result);
}

/// \fn copy_if_until ( const Range& r, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred )
/// \brief Copies all the elements from the input range that satisfy the
/// copy predicate to the output range until the termination predicate is
/// satisfied.
/// \return The updated output iterator
///
/// \param r The input range
/// \param result An output iterator to write the results into
/// \param copy_pred A predicate for testing whether to the current element
/// \param term_pred A predicate for testing whether to end the copy operation
template<typename Range, typename OutputIterator, typename CopyPredicate, typename TerminatePred>
BOOST_CXX14_CONSTEXPR std::pair<typename boost::range_iterator<const Range>::type, OutputIterator>
copy_if_until ( const Range& r, OutputIterator result, CopyPredicate copy_pred, TerminatePred term_pred)
{
return boost::algorithm::copy_if_until(boost::begin(r), boost::end(r), result, copy_pred, term_pred);
}

}} // namespace boost and algorithm

#endif // BOOST_ALGORITHM_COPY_IF_HPP
2 changes: 1 addition & 1 deletion inst/include/boost/algorithm/cxx11/is_permutation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <boost/config.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>

namespace boost { namespace algorithm {
Expand Down
6 changes: 3 additions & 3 deletions inst/include/boost/algorithm/cxx11/is_sorted.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>

#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/type_identity.hpp> // for boost::type_identity

namespace boost { namespace algorithm {

Expand Down Expand Up @@ -127,7 +127,7 @@ namespace boost { namespace algorithm {
/// \param p A binary predicate that returns true if two elements are ordered.
///
template <typename R, typename Pred>
BOOST_CXX14_CONSTEXPR typename boost::lazy_disable_if_c< boost::is_same<R, Pred>::value, boost::mpl::identity<bool> >::type
BOOST_CXX14_CONSTEXPR typename boost::lazy_disable_if_c< boost::is_same<R, Pred>::value, boost::type_identity<bool> >::type
is_sorted ( const R &range, Pred p )
{
return boost::algorithm::is_sorted ( boost::begin ( range ), boost::end ( range ), p );
Expand Down
15 changes: 15 additions & 0 deletions inst/include/boost/algorithm/cxx17/transform_exclusive_scan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@

namespace boost { namespace algorithm {

/// \fn transform_exclusive_scan ( InputIterator first, InputIterator last, OutputIterator result, BinaryOperation bOp, UnaryOperation uOp, T init )
/// \brief Transforms elements from the input range with uOp and then combines
/// those transformed elements with bOp such that the n-1th element and the nth
/// element are combined. Exclusivity means that the nth element is not
/// included in the nth combination.
/// \return The updated output iterator
///
/// \param first The start of the input sequence
/// \param last The end of the input sequence
/// \param result The output iterator to write the results into
/// \param bOp The operation for combining transformed input elements
/// \param uOp The operation for transforming input elements
/// \param init The initial value
///
/// \note This function is part of the C++17 standard library
template<class InputIterator, class OutputIterator, class T,
class BinaryOperation, class UnaryOperation>
OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last,
Expand Down
29 changes: 29 additions & 0 deletions inst/include/boost/algorithm/cxx17/transform_inclusive_scan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@

namespace boost { namespace algorithm {

/// \fn transform_inclusive_scan ( InputIterator first, InputIterator last, OutputIterator result, BinaryOperation bOp, UnaryOperation uOp, T init )
/// \brief Transforms elements from the input range with uOp and then combines
/// those transformed elements with bOp such that the n-1th element and the nth
/// element are combined. Inclusivity means that the nth element is included in
/// the nth combination.
/// \return The updated output iterator
///
/// \param first The start of the input sequence
/// \param last The end of the input sequence
/// \param result The output iterator to write the results into
/// \param bOp The operation for combining transformed input elements
/// \param uOp The operation for transforming input elements
/// \param init The initial value
///
/// \note This function is part of the C++17 standard library
template<class InputIterator, class OutputIterator,
class BinaryOperation, class UnaryOperation, class T>
OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last,
Expand All @@ -37,6 +52,20 @@ OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last,
return result;
}

/// \fn transform_inclusive_scan ( InputIterator first, InputIterator last, OutputIterator result, BinaryOperation bOp, UnaryOperation uOp, T init )
/// \brief Transforms elements from the input range with uOp and then combines
/// those transformed elements with bOp such that the n-1th element and the nth
/// element are combined. Inclusivity means that the nth element is included in
/// the nth combination. The first value will be used as the init.
/// \return The updated output iterator
///
/// \param first The start of the input sequence
/// \param last The end of the input sequence
/// \param result The output iterator to write the results into
/// \param bOp The operation for combining transformed input elements
/// \param uOp The operation for transforming input elements
///
/// \note This function is part of the C++17 standard library
template<class InputIterator, class OutputIterator,
class BinaryOperation, class UnaryOperation>
OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last,
Expand Down
8 changes: 4 additions & 4 deletions inst/include/boost/algorithm/hex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <boost/exception/info.hpp>
#include <boost/throw_exception.hpp>

#include <boost/utility/enable_if.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/type_traits/is_integral.hpp>


Expand All @@ -48,9 +48,9 @@ namespace boost { namespace algorithm {
\brief Thrown when the input sequence unexpectedly ends

*/
struct hex_decode_error : virtual boost::exception, virtual std::exception {};
struct not_enough_input : virtual hex_decode_error {};
struct non_hex_input : virtual hex_decode_error {};
struct BOOST_SYMBOL_VISIBLE hex_decode_error : virtual boost::exception, virtual std::exception {};
struct BOOST_SYMBOL_VISIBLE not_enough_input : virtual hex_decode_error {};
struct BOOST_SYMBOL_VISIBLE non_hex_input : virtual hex_decode_error {};
typedef boost::error_info<struct bad_char_,char> bad_char;

namespace detail {
Expand Down
Loading