当前位置:网站首页>std::enable_shared_from_this 错误:error: expected template-name before ‘<’ token
std::enable_shared_from_this 错误:error: expected template-name before ‘<’ token
2022-06-22 17:28:00 【追梦-北极星】
enable_shared_from_this用法:
C++11新特性之十:enable_shared_from_this_草上爬的博客-CSDN博客
std::enable_shared_from_this - cppreference.com
在重构过程中,为了避免别人正在修改的模块影响自己,把一些模块屏蔽了,结果出现了下面的错误信息,如下:
../runtime/idm_client_proc_v2.h:70:86: error: expected template-name before ‘<’ token
70 | class CallbackWrapper : public idm::IIDMClient, public std::enable_shared_from_this<CallbackWrapper> {
类似代码片段如下:
class CallbackWrapper : public Client, public std::enable_shared_from_this<CallbackWrapper> {
public:
CallbackWrapper(const std::string& client_id, const std::string& identity, IDMClientProcV2* idm_client_proc);
}经过查证,发现是因为缺少memory头文件引起的,并且说这个只能用shared_ptr创建
enable_shared_from_this only works if the type was created as shared_ptr. Use:
边栏推荐
- Golang implements redis (10): local atomic transactions
- RF analyzer demo setup
- Correct method of converting Inkscape into DXF file SVG exporting DXF file
- Conda——基础配置命令总结
- 2022年G2电站锅炉司炉题库及在线模拟考试
- Traditional image -- LBP feature
- 线程池:ThreadPoolExcutor源码阅读
- Jenkins中node节点添加之SSH方式2
- Azkaban startup error 2022/06/20 21:39:27.726 +0800 error [stdouterrredirect] [azkaban] exception in thread "m
- What happened to this page when sqlserver was saving
猜你喜欢

Beijing restorer's half moon: how to rekindle the fireworks in store management

<JVM上篇:内存与垃圾回收篇>08-对象实例化及直接内存
Redis usage scenario sharing (project practice)

Behind the fall of the first Seberg: the extreme race between technology and frostbite

腾讯云国际版云服务器欠费说明
DBMS in Oracle_ output. put_ Example of line usage

At 19:30 today, the science popularization leader said that he would take you to explore how AI can stimulate human creativity
Concepts and solutions of redis' cache penetration, cache avalanche and cache breakdown problems

When do project managers particularly want to escape from work?

wpa_cli参数说明
随机推荐
链表4- 21 合并两个有序链表
炒股开户选择哪个券商公司是最安全最好呢
传统图像--LBP特征
大一女生废话编程爆火!懂不懂编程的看完都拴Q了
请问一下flink mysql-cdc 如何保证server_id全局唯一呢?
Jenkins installation and upgrade
【win11】注册表修改fix 右键没有新建
各位大佬,第一次使用flink mysql cdc, 现在程序启动 没报错 新增数据没有打印出来
Pytorch——报错解决:“torch/optim/adamw.py” beta1, UnboundLocalError: local variable ‘beta1‘
Is it safe for Ping An Securities to open an account? What is its relationship with Ping An Bank?
Preliminary controller input of oculus learning notes (1)
国产手机干翻苹果?原来是靠百元机和猛降价实现的
【owt】owt-client-native-p2p-e2e-test vs2017 构建
第四届青年生命科学论坛 | 第一轮通知
The Fourth Youth Life Science Forum | first round notice
A course for New Oriental transformation bilingual live broadcast to bring goods to the project manager
排序---
How can I automatically make an appointment to make a new debt? Is it convenient and safe to make an appointment to make a new bond
When do project managers particularly want to escape from work?
SystemVerilog (12) - $unit declaration space