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:
committed by
Alan de Freitas
parent
ec55734d36
commit
0ca58467a4
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user