0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️🆔 Add ctor w/o type erasure to string_view.

This commit is contained in:
Jason Volk 2020-11-29 17:48:10 -08:00
parent a9f6782309
commit 966a0e7bdb

View file

@ -85,6 +85,7 @@ struct ircd::m::id
id(const enum sigil &, const mutable_buffer &, const string_view &local, const string_view &host);
id(const enum sigil &, const mutable_buffer &, const string_view &id);
id(const enum sigil &, const string_view &id);
explicit id(const enum sigil &, const id &);
id(const string_view &id);
id() = default;
};
@ -379,7 +380,14 @@ ircd::m::id::id(const string_view &str)
{
m::sigil(str), str
}
{}
inline
ircd::m::id::id(const id::sigil &sigil,
const id &id)
:string_view{id}
{
assert(this->empty() || this->front() == sigil);
}
inline