|
|
|||
File indexing completed on 2026-08-17 09:00:34
0001 #ifndef BOOST_SMART_PTR_DETAIL_SP_CXX20_CONSTEXPR_HPP_INCLUDED 0002 #define BOOST_SMART_PTR_DETAIL_SP_CXX20_CONSTEXPR_HPP_INCLUDED 0003 0004 // MS compatible compilers support #pragma once 0005 0006 #if defined(_MSC_VER) && (_MSC_VER >= 1020) 0007 #pragma once 0008 #endif 0009 0010 // detail/sp_noexcept.hpp 0011 // 0012 // Copyright 2025 Mathias Stearn 0013 // 0014 // Distributed under the Boost Software License, Version 1.0. 0015 // See accompanying file LICENSE_1_0.txt or copy at 0016 // http://www.boost.org/LICENSE_1_0.txt 0017 0018 0019 // This macro is used to mark functions as constexpr if the compiler supports 0020 // constexpr destructors. Since you can't have a constexpr smart pointer object, 0021 // everything except null constructors are guided behind this macro. Because 0022 // this also guards a use of dynamic_cast, we need to check for its availability 0023 // as well. It isn't worth splitting out since all known compilers that support 0024 // constexpr dynamic_cast also support constexpr destructors. 0025 // 0026 // WARNING: This does not check for changing active member of a union in 0027 // constant expressions which is allowed in C++20. If that is needed, we 0028 // need to raise the checked version to 202002L. 0029 #if defined(__cpp_constexpr_dynamic_alloc) && __cpp_constexpr_dynamic_alloc >= 201907L \ 0030 && defined(__cpp_constexpr) && __cpp_constexpr >= 201907L 0031 #define BOOST_SP_CXX20_CONSTEXPR constexpr 0032 #else 0033 #define BOOST_SP_CXX20_CONSTEXPR 0034 #define BOOST_SP_NO_CXX20_CONSTEXPR 0035 #endif 0036 0037 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_CXX20_CONSTEXPR_HPP_INCLUDED
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|