mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 00:32:35 +01:00
ircd::buffer: Add convenience typedefs for unique/shared buffer common templates.
This commit is contained in:
parent
97590c4b3e
commit
864cdd6405
1 changed files with 11 additions and 0 deletions
|
@ -34,10 +34,12 @@ namespace boost::asio
|
|||
namespace ircd::buffer
|
||||
{
|
||||
template<class it> struct buffer;
|
||||
|
||||
struct const_buffer;
|
||||
struct mutable_buffer;
|
||||
struct window_buffer;
|
||||
struct parse_buffer;
|
||||
|
||||
template<class buffer, size_t SIZE> struct fixed_buffer;
|
||||
template<class buffer> struct unique_buffer;
|
||||
template<class buffer> struct shared_buffer;
|
||||
|
@ -47,6 +49,11 @@ namespace ircd::buffer
|
|||
template<template<class> class I> using const_buffers = I<const_buffer>;
|
||||
template<template<class> class I> using mutable_buffers = I<mutable_buffer>;
|
||||
|
||||
using unique_const_buffer = unique_buffer<const_buffer>;
|
||||
using unique_mutable_buffer = unique_buffer<mutable_buffer>;
|
||||
using shared_const_buffer = shared_buffer<const_buffer>;
|
||||
using shared_mutable_buffer = shared_buffer<mutable_buffer>;
|
||||
|
||||
// Preconstructed null buffers
|
||||
extern const mutable_buffer null_buffer;
|
||||
extern const ilist<mutable_buffer> null_buffers;
|
||||
|
@ -115,6 +122,10 @@ namespace ircd
|
|||
using buffer::window_buffer;
|
||||
using buffer::fixed_const_buffer;
|
||||
using buffer::fixed_mutable_buffer;
|
||||
using buffer::unique_const_buffer;
|
||||
using buffer::unique_mutable_buffer;
|
||||
using buffer::shared_const_buffer;
|
||||
using buffer::shared_mutable_buffer;
|
||||
|
||||
using buffer::const_buffers;
|
||||
using buffer::mutable_buffers;
|
||||
|
|
Loading…
Reference in a new issue