uri: constructors should be implicit for ease of use

They don't act like other classes, or implicitly convert to other
classes, so the risks are minimal.
This commit is contained in:
Danny Robson 2020-01-02 11:19:09 +11:00
parent f404acfda0
commit cff7375cc1

View File

@ -32,10 +32,10 @@ namespace cruft {
// any given protocol). eg, the "tel" is unlikely to have port numbers.
class uri {
public:
explicit uri (std::string &&);
explicit uri (const std::string&);
explicit uri (const char *);
explicit uri (cruft::view<const char *>);
uri (std::string &&);
uri (const std::string&);
uri (const char *);
uri (view<const char *>);
class parse_error : public std::runtime_error
{ using runtime_error::runtime_error; };