Skip to content
Snippets Groups Projects
Commit ebc4c809 authored by Luca Bassi's avatar Luca Bassi
Browse files

Fix redefinition of make_iterator_range_n in newer versions of Boost

make_iterator_range_n was introduced in Boost 1.56.0
https://github.com/boostorg/range/commit/70256bd8b04036eb9c5db12bc603f84fa8a35541
parent 591e325f
No related branches found
No related tags found
1 merge request!25Fix redefinition of make_iterator_range_n in newer versions of Boost
......@@ -17,6 +17,7 @@ extern "C" {
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/optional.hpp>
#include <boost/version.hpp>
using BioPtr = std::unique_ptr<BIO, decltype(&BIO_free)>;
using X509Ptr = std::unique_ptr<X509, decltype(&X509_free)>;
......@@ -649,6 +650,7 @@ static ngx_int_t get_ssl_client_ee_cert_raw(ngx_http_request_t* r,
return NGX_OK;
}
#if BOOST_VERSION < 105600
namespace boost {
template <typename IteratorT, typename IntegerT>
inline iterator_range<IteratorT> make_iterator_range_n(IteratorT first,
......@@ -657,6 +659,7 @@ inline iterator_range<IteratorT> make_iterator_range_n(IteratorT first,
return iterator_range<IteratorT>(first, boost::next(first, n));
}
} // namespace boost
#endif
static ngx_int_t get_ssl_client_ee_cert(ngx_http_request_t* r,
ngx_http_variable_value_t* v,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment