// Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QQMLDOMFUNCTIONREF_P_H #define QQMLDOMFUNCTIONREF_P_H // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // #include #if !defined(Q_CC_MSVC) || Q_CC_MSVC >= 1930 #include QT_BEGIN_NAMESPACE namespace QQmlJS { namespace Dom { template using function_ref = qxp::function_ref; } // namespace Dom } // namespace QQmlJS QT_END_NAMESPACE #else #include QT_BEGIN_NAMESPACE namespace QQmlJS { namespace Dom { namespace _detail { template struct function_ref_helper { using type = std::function; }; // std::function doesn't grok the const in , so remove: template struct function_ref_helper : function_ref_helper {}; // std::function doesn't grok the noexcept in , so remove: template struct function_ref_helper : function_ref_helper {}; // and both together: template struct function_ref_helper : function_ref_helper {}; } // namespace _detail template using function_ref = const typename _detail::function_ref_helper::type &; } // namespace Dom } // namespace QQmlJS QT_END_NAMESPACE #endif #endif // QQMLDOMFUNCTIONREF_P_H