uri: constructors should be explicit
This commit is contained in:
parent
ceda32b912
commit
3e262f6aef
@ -287,7 +287,7 @@ test_rfc_resolve (cruft::TAP::logger &tap)
|
|||||||
for (auto const [relative, expected]: TESTS) {
|
for (auto const [relative, expected]: TESTS) {
|
||||||
cruft::uri const relative_obj (relative);
|
cruft::uri const relative_obj (relative);
|
||||||
cruft::uri const expected_obj (expected);
|
cruft::uri const expected_obj (expected);
|
||||||
cruft::uri const resolved_obj = resolve (base, relative);
|
cruft::uri const resolved_obj = resolve (base, cruft::uri (relative));
|
||||||
|
|
||||||
if (resolved_obj != expected_obj)
|
if (resolved_obj != expected_obj)
|
||||||
fmt::print (stderr, "# '{}' != '{}'\n", expected_obj, resolved_obj);
|
fmt::print (stderr, "# '{}' != '{}'\n", expected_obj, resolved_obj);
|
||||||
|
8
uri.hpp
8
uri.hpp
@ -34,15 +34,15 @@ namespace cruft {
|
|||||||
// any given protocol). eg, the "tel" is unlikely to have port numbers.
|
// any given protocol). eg, the "tel" is unlikely to have port numbers.
|
||||||
class uri {
|
class uri {
|
||||||
public:
|
public:
|
||||||
uri (std::string &&);
|
explicit uri (std::string &&);
|
||||||
uri& operator= (uri &&) noexcept;
|
uri& operator= (uri &&) noexcept;
|
||||||
|
|
||||||
uri (uri const&);
|
uri (uri const&);
|
||||||
uri& operator= (uri const&);
|
uri& operator= (uri const&);
|
||||||
|
|
||||||
uri (const std::string&);
|
explicit uri (const std::string&);
|
||||||
uri (const char *);
|
explicit uri (const char *);
|
||||||
uri (view<const char *>);
|
explicit uri (view<const char *>);
|
||||||
|
|
||||||
uri (
|
uri (
|
||||||
std::string_view scheme,
|
std::string_view scheme,
|
||||||
|
Loading…
Reference in New Issue
Block a user