Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
quantlib 1.16 for old and new toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Aug 6, 2019
1 parent b5cd1e8 commit daa458b
Show file tree
Hide file tree
Showing 1,212 changed files with 20,986 additions and 103,493 deletions.
147 changes: 0 additions & 147 deletions build_RQuantLib.sh

This file was deleted.

8 changes: 4 additions & 4 deletions include/boost/algorithm/algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
namespace boost { namespace algorithm {

template <typename T>
BOOST_CXX14_CONSTEXPR T identity_operation ( std::multiplies<T> ) { return T(1); }
T identity_operation ( std::multiplies<T> ) { return T(1); }

template <typename T>
BOOST_CXX14_CONSTEXPR T identity_operation ( std::plus<T> ) { return T(0); }
T identity_operation ( std::plus<T> ) { return T(0); }


/// \fn power ( T x, Integer n )
Expand All @@ -40,7 +40,7 @@ BOOST_CXX14_CONSTEXPR T identity_operation ( std::plus<T> ) { return T(0); }
// \remark Taken from Knuth, The Art of Computer Programming, Volume 2:
// Seminumerical Algorithms, Section 4.6.3
template <typename T, typename Integer>
BOOST_CXX14_CONSTEXPR typename boost::enable_if<boost::is_integral<Integer>, T>::type
typename boost::enable_if<boost::is_integral<Integer>, T>::type
power (T x, Integer n) {
T y = 1; // Should be "T y{1};"
if (n == 0) return y;
Expand All @@ -67,7 +67,7 @@ power (T x, Integer n) {
// \remark Taken from Knuth, The Art of Computer Programming, Volume 2:
// Seminumerical Algorithms, Section 4.6.3
template <typename T, typename Integer, typename Operation>
BOOST_CXX14_CONSTEXPR typename boost::enable_if<boost::is_integral<Integer>, T>::type
typename boost::enable_if<boost::is_integral<Integer>, T>::type
power (T x, Integer n, Operation op) {
T y = identity_operation(op);
if (n == 0) return y;
Expand Down
125 changes: 0 additions & 125 deletions include/boost/algorithm/apply_permutation.hpp

This file was deleted.

22 changes: 11 additions & 11 deletions include/boost/algorithm/clamp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace boost { namespace algorithm {
/// p ( a, b ) returns a boolean.
///
template<typename T, typename Pred>
BOOST_CXX14_CONSTEXPR T const & clamp ( T const& val,
T const & clamp ( T const& val,
typename boost::mpl::identity<T>::type const & lo,
typename boost::mpl::identity<T>::type const & hi, Pred p )
{
Expand All @@ -68,11 +68,11 @@ namespace boost { namespace algorithm {
/// \param hi The upper bound of the range to be clamped to
///
template<typename T>
BOOST_CXX14_CONSTEXPR T const& clamp ( const T& val,
T const& clamp ( const T& val,
typename boost::mpl::identity<T>::type const & lo,
typename boost::mpl::identity<T>::type const & hi )
{
return boost::algorithm::clamp ( val, lo, hi, std::less<T>());
return (clamp) ( val, lo, hi, std::less<T>());
}

/// \fn clamp_range ( InputIterator first, InputIterator last, OutputIterator out,
Expand All @@ -87,13 +87,13 @@ namespace boost { namespace algorithm {
/// \param hi The upper bound of the range to be clamped to
///
template<typename InputIterator, typename OutputIterator>
BOOST_CXX14_CONSTEXPR OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out,
OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out,
typename std::iterator_traits<InputIterator>::value_type const & lo,
typename std::iterator_traits<InputIterator>::value_type const & hi )
{
// this could also be written with bind and std::transform
while ( first != last )
*out++ = boost::algorithm::clamp ( *first++, lo, hi );
*out++ = clamp ( *first++, lo, hi );
return out;
}

Expand All @@ -108,12 +108,12 @@ namespace boost { namespace algorithm {
/// \param hi The upper bound of the range to be clamped to
///
template<typename Range, typename OutputIterator>
BOOST_CXX14_CONSTEXPR typename boost::disable_if_c<boost::is_same<Range, OutputIterator>::value, OutputIterator>::type
typename boost::disable_if_c<boost::is_same<Range, OutputIterator>::value, OutputIterator>::type
clamp_range ( const Range &r, OutputIterator out,
typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & lo,
typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & hi )
{
return boost::algorithm::clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi );
return clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi );
}


Expand All @@ -133,13 +133,13 @@ namespace boost { namespace algorithm {

///
template<typename InputIterator, typename OutputIterator, typename Pred>
BOOST_CXX14_CONSTEXPR OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out,
OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out,
typename std::iterator_traits<InputIterator>::value_type const & lo,
typename std::iterator_traits<InputIterator>::value_type const & hi, Pred p )
{
// this could also be written with bind and std::transform
while ( first != last )
*out++ = boost::algorithm::clamp ( *first++, lo, hi, p );
*out++ = clamp ( *first++, lo, hi, p );
return out;
}

Expand All @@ -160,13 +160,13 @@ namespace boost { namespace algorithm {
// Disable this template if the first two parameters are the same type;
// In that case, the user will get the two iterator version.
template<typename Range, typename OutputIterator, typename Pred>
BOOST_CXX14_CONSTEXPR typename boost::disable_if_c<boost::is_same<Range, OutputIterator>::value, OutputIterator>::type
typename boost::disable_if_c<boost::is_same<Range, OutputIterator>::value, OutputIterator>::type
clamp_range ( const Range &r, OutputIterator out,
typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & lo,
typename std::iterator_traits<typename boost::range_iterator<const Range>::type>::value_type const & hi,
Pred p )
{
return boost::algorithm::clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi, p );
return clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi, p );
}


Expand Down
Loading

0 comments on commit daa458b

Please sign in to comment.