2
0
mirror of https://github.com/boostorg/url.git synced 2026-01-19 04:42:15 +00:00

fix: url_view string_view constructor requires non-url_view_base

fix #756
This commit is contained in:
alandefreitas
2023-07-18 15:33:40 -03:00
committed by Alan de Freitas
parent ec55734d36
commit 0ca58467a4
2 changed files with 15 additions and 1 deletions

View File

@@ -204,7 +204,12 @@ public:
std::is_convertible<
String,
core::string_view
>::value>::type
>::value &&
!std::is_convertible<
String*,
url_view_base*
>::value
>::type
#endif
>
url_view(

View File

@@ -108,6 +108,15 @@ public:
auto const f = []( url_view ) {};
f( "x" );
}
// issue #756
{
url u("http://example.com");
auto foo = [&u](url_view uv) {
BOOST_TEST(uv.buffer().data() == u.buffer().data());
};
foo(u);
}
}
void