Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:30:30

0001 /*
0002 Copyright 2023 Glen Joseph Fernandes
0003 (glenjofe@gmail.com)
0004 
0005 Distributed under the Boost Software License, Version 1.0.
0006 (http://www.boost.org/LICENSE_1_0.txt)
0007 */
0008 #ifndef BOOST_CORE_MAKE_SPAN_HPP
0009 #define BOOST_CORE_MAKE_SPAN_HPP
0010 
0011 #include <boost/core/span.hpp>
0012 
0013 namespace boost {
0014 
0015 template<class I>
0016 inline constexpr span<I>
0017 make_span(I* f, std::size_t c) noexcept
0018 {
0019     return span<I>(f, c);
0020 }
0021 
0022 template<class I>
0023 inline constexpr span<I>
0024 make_span(I* f, I* l) noexcept
0025 {
0026     return span<I>(f, l);
0027 }
0028 
0029 template<class T, std::size_t N>
0030 inline constexpr span<T, N>
0031 make_span(T(&a)[N]) noexcept
0032 {
0033     return span<T, N>(a);
0034 }
0035 
0036 template<class T, std::size_t N>
0037 inline constexpr span<T, N>
0038 make_span(std::array<T, N>& a) noexcept
0039 {
0040     return span<T, N>(a);
0041 }
0042 
0043 template<class T, std::size_t N>
0044 inline constexpr span<const T, N>
0045 make_span(const std::array<T, N>& a) noexcept
0046 {
0047     return span<const T, N>(a);
0048 }
0049 
0050 template<class R>
0051 inline span<typename detail::span_data<R>::type>
0052 make_span(R&& r)
0053 {
0054     return span<typename detail::span_data<R>::type>(std::forward<R>(r));
0055 }
0056 
0057 } /* boost */
0058 
0059 #endif