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) {
|
||||
cruft::uri const relative_obj (relative);
|
||||
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)
|
||||
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.
|
||||
class uri {
|
||||
public:
|
||||
uri (std::string &&);
|
||||
explicit uri (std::string &&);
|
||||
uri& operator= (uri &&) noexcept;
|
||||
|
||||
uri (uri const&);
|
||||
uri& operator= (uri const&);
|
||||
|
||||
uri (const std::string&);
|
||||
uri (const char *);
|
||||
uri (view<const char *>);
|
||||
explicit uri (const std::string&);
|
||||
explicit uri (const char *);
|
||||
explicit uri (view<const char *>);
|
||||
|
||||
uri (
|
||||
std::string_view scheme,
|
||||
|
Loading…
Reference in New Issue
Block a user