/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 2018 Danny Robson */ #pragma once #include namespace cruft::buffer { /////////////////////////////////////////////////////////////////////////// /// A trait that evaluates to true if the queried type models cruft::allocator template < typename BufferT, typename = std::void_t<> > struct is_buffer : public std::false_type { }; //------------------------------------------------------------------------- template struct is_buffer ().begin ()), decltype(std::declval ().end ()), decltype(std::declval ().size ()), void > > : public std::true_type { }; //------------------------------------------------------------------------- template constexpr auto is_buffer_v = is_buffer::value; }