mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::tokens: Relax noexcept on token result closures.
This commit is contained in:
parent
adc7f16831
commit
6fb9cd7bf1
2 changed files with 6 additions and 12 deletions
|
@ -18,15 +18,15 @@ namespace ircd
|
|||
// to allocate and copy the token with null termination.
|
||||
using token_view = closure_bool<std::function, const string_view &>;
|
||||
|
||||
bool tokens(const string_view &, const char sep, const token_view &) noexcept;
|
||||
bool tokens(const string_view &, const string_view &sep, const token_view &) noexcept;
|
||||
bool tokens(const string_view &, const char sep, const token_view &);
|
||||
bool tokens(const string_view &, const string_view &sep, const token_view &);
|
||||
|
||||
size_t tokens(const string_view &, const char sep, const size_t lim, const token_view &) noexcept;
|
||||
size_t tokens(const string_view &, const string_view &sep, const size_t lim, const token_view &) noexcept;
|
||||
size_t tokens(const string_view &, const char sep, const size_t lim, const token_view &);
|
||||
size_t tokens(const string_view &, const string_view &sep, const size_t lim, const token_view &);
|
||||
|
||||
// Copies tokens into your buffer and null terminates strtok() style. Returns BYTES of buf consumed.
|
||||
size_t tokens(const string_view &, const char sep, const mutable_buffer &, const token_view &) noexcept;
|
||||
size_t tokens(const string_view &, const string_view &sep, const mutable_buffer &, const token_view &) noexcept;
|
||||
size_t tokens(const string_view &, const char sep, const mutable_buffer &, const token_view &);
|
||||
size_t tokens(const string_view &, const string_view &sep, const mutable_buffer &, const token_view &);
|
||||
|
||||
// Receive token view into iterator range
|
||||
template<class it,
|
||||
|
|
|
@ -373,7 +373,6 @@ ircd::tokens(const string_view &str,
|
|||
const char sep_,
|
||||
const mutable_buffer &buf,
|
||||
const token_view &closure)
|
||||
noexcept
|
||||
{
|
||||
assert(sep_ != '\0');
|
||||
const char _sep[2]
|
||||
|
@ -394,7 +393,6 @@ ircd::tokens(const string_view &str,
|
|||
const string_view &sep,
|
||||
const mutable_buffer &buf,
|
||||
const token_view &closure)
|
||||
noexcept
|
||||
{
|
||||
char *ptr(data(buf));
|
||||
char *const stop(data(buf) + size(buf));
|
||||
|
@ -419,7 +417,6 @@ ircd::tokens(const string_view &str,
|
|||
const char sep,
|
||||
const size_t limit,
|
||||
const token_view &closure)
|
||||
noexcept
|
||||
{
|
||||
using type = string_view;
|
||||
using iter = typename type::const_iterator;
|
||||
|
@ -444,7 +441,6 @@ ircd::tokens(const string_view &str,
|
|||
const string_view &sep,
|
||||
const size_t limit,
|
||||
const token_view &closure)
|
||||
noexcept
|
||||
{
|
||||
using type = string_view;
|
||||
using iter = typename type::const_iterator;
|
||||
|
@ -468,7 +464,6 @@ bool
|
|||
ircd::tokens(const string_view &str,
|
||||
const char sep,
|
||||
const token_view &closure)
|
||||
noexcept
|
||||
{
|
||||
using type = string_view;
|
||||
using iter = typename type::const_iterator;
|
||||
|
@ -491,7 +486,6 @@ bool
|
|||
ircd::tokens(const string_view &str,
|
||||
const string_view &sep,
|
||||
const token_view &closure)
|
||||
noexcept
|
||||
{
|
||||
using type = string_view;
|
||||
using iter = typename type::const_iterator;
|
||||
|
|
Loading…
Reference in a new issue