mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 14:31:11 +01:00
ircd::buffer: Add const_buffer::insert() for boost::spirit compliance (noop).
This commit is contained in:
parent
ac4ed03142
commit
5e8c1ad52d
1 changed files with 13 additions and 0 deletions
|
@ -17,6 +17,9 @@ struct ircd::buffer::const_buffer
|
|||
// Definition for this is somewhere in the .cc files where boost is incl.
|
||||
operator boost::asio::const_buffer() const;
|
||||
|
||||
// For boost::spirit conceptual compliance; illegal/noop
|
||||
void insert(const char *const &, const char &);
|
||||
|
||||
using buffer<const char *>::buffer;
|
||||
template<size_t SIZE> const_buffer(const char (&buf)[SIZE]);
|
||||
template<size_t SIZE> const_buffer(const std::array<char, SIZE> &buf);
|
||||
|
@ -56,3 +59,13 @@ template<size_t SIZE>
|
|||
ircd::buffer::const_buffer::const_buffer(const std::array<char, SIZE> &buf)
|
||||
:buffer<const char *>{reinterpret_cast<const char *>(buf.data()), SIZE}
|
||||
{}
|
||||
|
||||
#ifndef _NDEBUG
|
||||
__attribute__((noreturn))
|
||||
#endif
|
||||
inline void
|
||||
ircd::buffer::const_buffer::insert(const char *const &,
|
||||
const char &)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue