From 5e8c1ad52d68629db5d376f4d7e5be792219a9fb Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sun, 1 Jul 2018 19:49:49 -0700 Subject: [PATCH] ircd::buffer: Add const_buffer::insert() for boost::spirit compliance (noop). --- include/ircd/buffer/const_buffer.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/ircd/buffer/const_buffer.h b/include/ircd/buffer/const_buffer.h index 11f193a8b..5acec1f55 100644 --- a/include/ircd/buffer/const_buffer.h +++ b/include/ircd/buffer/const_buffer.h @@ -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::buffer; template const_buffer(const char (&buf)[SIZE]); template const_buffer(const std::array &buf); @@ -56,3 +59,13 @@ template ircd::buffer::const_buffer::const_buffer(const std::array &buf) :buffer{reinterpret_cast(buf.data()), SIZE} {} + +#ifndef _NDEBUG +__attribute__((noreturn)) +#endif +inline void +ircd::buffer::const_buffer::insert(const char *const &, + const char &) +{ + assert(0); +}