Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 08:38:12

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_SIZE_HPP
0009 #define BOOST_CORE_SIZE_HPP
0010 
0011 #include <cstddef>
0012 
0013 namespace boost {
0014 
0015 template<class C>
0016 inline constexpr auto
0017 size(const C& c) noexcept(noexcept(c.size())) -> decltype(c.size())
0018 {
0019     return c.size();
0020 }
0021 
0022 template<class T, std::size_t N>
0023 inline constexpr std::size_t
0024 size(T(&)[N]) noexcept
0025 {
0026     return N;
0027 }
0028 
0029 } /* boost */
0030 
0031 #endif