Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:24

0001 //
0002 // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 // Official repository: https://github.com/boostorg/beast
0008 //
0009 
0010 #ifndef BOOST_BEAST_DETAIL_STATIC_CONST_HPP
0011 #define BOOST_BEAST_DETAIL_STATIC_CONST_HPP
0012 
0013 /*  This is a derivative work, original copyright:
0014 
0015     Copyright Eric Niebler 2013-present
0016 
0017     Use, modification and distribution is subject to the
0018     Boost Software License, Version 1.0. (See accompanying
0019     file LICENSE_1_0.txt or copy at
0020     http://www.boost.org/LICENSE_1_0.txt)
0021 
0022     Project home: https://github.com/ericniebler/range-v3
0023 */
0024 
0025 namespace boost {
0026 namespace beast {
0027 namespace detail {
0028 
0029 template<typename T>
0030 struct static_const
0031 {
0032     static constexpr T value {};
0033 };
0034 
0035 template<typename T>
0036 constexpr T static_const<T>::value;
0037 
0038 #define BOOST_BEAST_INLINE_VARIABLE(name, type) \
0039     namespace \
0040     { \
0041         constexpr auto& name = \
0042             ::boost::beast::detail::static_const<type>::value; \
0043     }
0044 
0045 } // detail
0046 } // beast
0047 } // boost
0048 
0049 #endif