// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2018 Jason Volk // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. #pragma once #define HAVE_IRCD_BUFFER_SHARED_BUFFER_H template struct ircd::buffer::shared_buffer :std::shared_ptr ,buffer { shared_buffer(const size_t &size); shared_buffer() = default; }; template ircd::buffer::shared_buffer::shared_buffer(const size_t &size) :std::shared_ptr { std::make_shared(size) } ,buffer { std::shared_ptr::get(), size } {}