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:
parent
a9f6782309
commit
966a0e7bdb
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue