mirror of
https://github.com/boostorg/url.git
synced 2026-02-21 15:32:13 +00:00
@@ -13,10 +13,8 @@
|
||||
|
||||
#include <boost/url/detail/config.hpp>
|
||||
#include <boost/url/detail/segments_iter_impl.hpp>
|
||||
#include <boost/url/string_view.hpp>
|
||||
#include <boost/url/detail/except.hpp>
|
||||
#include <boost/url/detail/any_segments_iter.hpp>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost {
|
||||
namespace urls {
|
||||
@@ -36,15 +34,23 @@ clear() noexcept
|
||||
}
|
||||
|
||||
template<class FwdIt>
|
||||
auto
|
||||
void
|
||||
segments_encoded_ref::
|
||||
assign(FwdIt first, FwdIt last) ->
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
pct_string_view>::value>::type
|
||||
assign(
|
||||
FwdIt first, FwdIt last)
|
||||
{
|
||||
/* If you get a compile error here, it
|
||||
means that the iterators you passed
|
||||
do not meet the requirements stated
|
||||
in the documentation.
|
||||
*/
|
||||
static_assert(
|
||||
std::is_convertible<
|
||||
typename std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
"Type requirements not met");
|
||||
|
||||
u_->edit_segments(
|
||||
begin().it_,
|
||||
end().it_,
|
||||
@@ -59,14 +65,24 @@ insert(
|
||||
iterator before,
|
||||
FwdIt first,
|
||||
FwdIt last) ->
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
pct_string_view>::value,
|
||||
iterator>::type
|
||||
iterator
|
||||
{
|
||||
return insert(before, first, last,
|
||||
/* If you get a compile error here, it
|
||||
means that the iterators you passed
|
||||
do not meet the requirements stated
|
||||
in the documentation.
|
||||
*/
|
||||
static_assert(
|
||||
std::is_convertible<
|
||||
typename std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
"Type requirements not met");
|
||||
|
||||
return insert(
|
||||
before,
|
||||
first,
|
||||
last,
|
||||
typename std::iterator_traits<
|
||||
FwdIt>::iterator_category{});
|
||||
}
|
||||
@@ -89,13 +105,20 @@ replace(
|
||||
iterator to,
|
||||
FwdIt first,
|
||||
FwdIt last) ->
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
pct_string_view>::value,
|
||||
iterator>::type
|
||||
iterator
|
||||
{
|
||||
/* If you get a compile error here, it
|
||||
means that the iterators you passed
|
||||
do not meet the requirements stated
|
||||
in the documentation.
|
||||
*/
|
||||
static_assert(
|
||||
std::is_convertible<
|
||||
typename std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
"Type requirements not met");
|
||||
|
||||
return u_->edit_segments(
|
||||
from.it_,
|
||||
to.it_,
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#define BOOST_URL_IMPL_SEGMENTS_REF_HPP
|
||||
|
||||
#include <boost/url/detail/config.hpp>
|
||||
#include <boost/url/segments_base.hpp>
|
||||
#include <boost/url/detail/any_segments_iter.hpp>
|
||||
#include <iterator>
|
||||
#include <boost/url/detail/segments_iter_impl.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost {
|
||||
namespace urls {
|
||||
@@ -34,15 +34,22 @@ clear() noexcept
|
||||
}
|
||||
|
||||
template<class FwdIt>
|
||||
auto
|
||||
void
|
||||
segments_ref::
|
||||
assign(FwdIt first, FwdIt last) ->
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value>::type
|
||||
assign(FwdIt first, FwdIt last)
|
||||
{
|
||||
/* If you get a compile error here, it
|
||||
means that the iterators you passed
|
||||
do not meet the requirements stated
|
||||
in the documentation.
|
||||
*/
|
||||
static_assert(
|
||||
std::is_convertible<
|
||||
typename std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
"Type requirements not met");
|
||||
|
||||
u_->edit_segments(
|
||||
begin().it_,
|
||||
end().it_,
|
||||
@@ -57,13 +64,20 @@ insert(
|
||||
iterator before,
|
||||
FwdIt first,
|
||||
FwdIt last) ->
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
iterator>::type
|
||||
iterator
|
||||
{
|
||||
/* If you get a compile error here, it
|
||||
means that the iterators you passed
|
||||
do not meet the requirements stated
|
||||
in the documentation.
|
||||
*/
|
||||
static_assert(
|
||||
std::is_convertible<
|
||||
typename std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
"Type requirements not met");
|
||||
|
||||
return insert(
|
||||
before,
|
||||
first,
|
||||
@@ -90,13 +104,20 @@ replace(
|
||||
iterator to,
|
||||
FwdIt first,
|
||||
FwdIt last) ->
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
iterator>::type
|
||||
iterator
|
||||
{
|
||||
/* If you get a compile error here, it
|
||||
means that the iterators you passed
|
||||
do not meet the requirements stated
|
||||
in the documentation.
|
||||
*/
|
||||
static_assert(
|
||||
std::is_convertible<
|
||||
typename std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
"Type requirements not met");
|
||||
|
||||
return u_->edit_segments(
|
||||
from.it_,
|
||||
to.it_,
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <boost/url/detail/config.hpp>
|
||||
#include <boost/url/segments_encoded_base.hpp>
|
||||
#include <initializer_list>
|
||||
#include <iterator>
|
||||
|
||||
namespace boost {
|
||||
namespace urls {
|
||||
@@ -358,15 +359,7 @@ public:
|
||||
to assign.
|
||||
*/
|
||||
template<class FwdIt>
|
||||
#ifdef BOOST_URL_DOCS
|
||||
void
|
||||
#else
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
pct_string_view>::value>::type
|
||||
#endif
|
||||
assign(FwdIt first, FwdIt last);
|
||||
|
||||
//--------------------------------------------
|
||||
@@ -509,16 +502,7 @@ public:
|
||||
to insert.
|
||||
*/
|
||||
template<class FwdIt>
|
||||
#ifdef BOOST_URL_DOCS
|
||||
iterator
|
||||
#else
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
pct_string_view>::value,
|
||||
iterator>::type
|
||||
#endif
|
||||
insert(
|
||||
iterator before,
|
||||
FwdIt first,
|
||||
@@ -729,16 +713,7 @@ public:
|
||||
@param first, last The range of segments to assign.
|
||||
*/
|
||||
template<class FwdIt>
|
||||
#ifdef BOOST_URL_DOCS
|
||||
iterator
|
||||
#else
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
pct_string_view>::value,
|
||||
iterator>::type
|
||||
#endif
|
||||
replace(
|
||||
iterator from,
|
||||
iterator to,
|
||||
|
||||
@@ -344,15 +344,7 @@ public:
|
||||
to assign.
|
||||
*/
|
||||
template<class FwdIt>
|
||||
#ifdef BOOST_URL_DOCS
|
||||
void
|
||||
#else
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value>::type
|
||||
#endif
|
||||
assign(FwdIt first, FwdIt last);
|
||||
|
||||
//--------------------------------------------
|
||||
@@ -479,16 +471,7 @@ public:
|
||||
to insert.
|
||||
*/
|
||||
template<class FwdIt>
|
||||
#ifdef BOOST_URL_DOCS
|
||||
iterator
|
||||
#else
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
iterator>::type
|
||||
#endif
|
||||
insert(
|
||||
iterator before,
|
||||
FwdIt first,
|
||||
@@ -682,16 +665,7 @@ public:
|
||||
@param first, last The range of segments to assign.
|
||||
*/
|
||||
template<class FwdIt>
|
||||
#ifdef BOOST_URL_DOCS
|
||||
iterator
|
||||
#else
|
||||
typename std::enable_if<
|
||||
std::is_convertible<typename
|
||||
std::iterator_traits<
|
||||
FwdIt>::reference,
|
||||
string_view>::value,
|
||||
iterator>::type
|
||||
#endif
|
||||
replace(
|
||||
iterator from,
|
||||
iterator to,
|
||||
|
||||
Reference in New Issue
Block a user