diff --git a/include/ircd/util.h b/include/ircd/util.h index 3f4fe90fb..7effbbd1e 100644 --- a/include/ircd/util.h +++ b/include/ircd/util.h @@ -383,6 +383,42 @@ size(std::ostream &s) return ret; } +template +constexpr size_t +size(const char (&buf)[SIZE]) +{ + return SIZE; +} + +template +constexpr size_t +size(const std::array &buf) +{ + return SIZE; +} + +template +constexpr size_t +size(const std::array &buf) +{ + return SIZE; +} + + +template +constexpr const char * +data(const char (&buf)[SIZE]) +{ + return buf; +} + +template +constexpr char * +data(char (&buf)[SIZE]) +{ + return buf; +} + template auto