Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:49:54

0001 /*
0002  * Copyright Matt Borland 2025.
0003  * Distributed under the Boost Software License, Version 1.0. (See
0004         * accompanying file LICENSE_1_0.txt or copy at
0005  * http://www.boost.org/LICENSE_1_0.txt)
0006  *
0007  * See http://www.boost.org for most recent version including documentation.
0008  *
0009  * $Id$
0010  */
0011 
0012 #include <iterator>
0013 #include <cstddef>
0014 
0015 namespace boost {
0016 namespace random {
0017 namespace detail {
0018 
0019 #if defined (__cpp_lib_nonmember_container_access) && __cpp_lib_nonmember_container_access >= 201411L
0020 
0021 using std::size;
0022 
0023 #else
0024 
0025 template <typename C>
0026 constexpr auto size(const C& c) -> decltype(c.size())
0027 {
0028     return c.size();
0029 }
0030 
0031 template <typename T, std::size_t N>
0032 constexpr std::size_t size(const T (&)[N]) noexcept
0033 {
0034     return N;
0035 }
0036 
0037 #endif
0038 
0039 } // namespace detail
0040 } // namespace random
0041 } // namespace boost