cpp-properties调试纪要

报两个错误

  1. std::result_of错误,C++20不支持,提前定义_HAS_DEPRECATED_RESULT_OF
  2. 实际用的是Qt5,不支持Q_DISABLE_COPY_MOVE,改为Q_DISABLE_COPY
// file: QtCore/qobjectdefs.h, line: 531, Qt: 5.12.5_msvc2017
template <typename Func>
static typename std::enable_if<!QtPrivate::FunctionPointer<Func>::IsPointerToMemberFunction
                               && QtPrivate::FunctionPointer<Func>::ArgumentCount == -1
                               && !std::is_convertible<Func, const char*>::value, bool>::type
invokeMethod(QObject *context, Func function, typename std::result_of<Func()>::type *ret)
{
    return invokeMethodImpl(context,
                            new QtPrivate::QFunctorSlotObjectWithNoArgs<Func, decltype(function())>(std::move(function)),
                            Qt::AutoConnection,
                            ret);
}


// file: type_traits, line: 1663
#if _HAS_DEPRECATED_RESULT_OF
template <class _Fty>
struct _CXX17_DEPRECATE_RESULT_OF result_of { // explain usage
    static_assert(_Always_false<_Fty>, "result_of<CallableType> is invalid; use "
                                       "result_of<CallableType(zero or more argument types)> instead.");
};

// file: yvals_core.h, line: 1095
#ifndef _HAS_DEPRECATED_RESULT_OF
#define _HAS_DEPRECATED_RESULT_OF (_HAS_FEATURES_REMOVED_IN_CXX20)
#endif // _HAS_DEPRECATED_RESULT_OF

// 项目属性页.配置属性.C/C++.预处理器.预处理器定义:_HAS_DEPRECATED_RESULT_OF


// qt_widgets/boolean.hpp
// Q_DISABLE_COPY_MOVE -> Q_DISABLE_COPY

// qt_widgets/integer.hpp
// Q_DISABLE_COPY_MOVE -> Q_DISABLE_COPY

// qt_widgets/nested.hpp
// Q_DISABLE_COPY_MOVE -> Q_DISABLE_COPY

创建Natvis文件

cppproperties.natvis

放在我的文档Visual Studio 2019\Visualizers

<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">

   <Type Name="tct::properties::property&lt;*&gt;">
        <DisplayString>{data}</DisplayString>
        <Expand>
            <Item Name="[data]">data</Item>
        </Expand>
    </Type>

   <!--Type Name="tct::properties::property&lt;int&gt;">
        <DisplayString>{data}</DisplayString>
        <Expand>
            <Item Name="[data]">data</Item>
        </Expand>
    </Type-->

</AutoVisualizer>

posted on   OctoberKey  阅读(112)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· SpringCloud带你走进微服务的世界

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示