当前位置:网站首页>std::enable_ shared_ from_ This error: error: expected template name before '<' token
std::enable_ shared_ from_ This error: error: expected template name before '<' token
2022-06-22 19:06:00 【Chasing dreams - Polaris】
enable_shared_from_this usage :
C++11 Ten new features :enable_shared_from_this_ Blog crawling on the grass -CSDN Blog
std::enable_shared_from_this - cppreference.com
During refactoring , In order to avoid the impact of the module being modified by others , Shielding some modules , As a result, the following error message appears , as follows :
../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> {
Similar code snippets are as follows :
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);
}After verification , The discovery is due to the lack of memory Caused by header file , And said this can only be used shared_ptr establish
enable_shared_from_this only works if the type was created as shared_ptr. Use:
Reference resources :https://www.reddit.com/r/cpp_questions/comments/kwhani/errors_while_using_stdenable_shared_from_this/
边栏推荐
- 2022 operation of simulated examination platform for examination question bank of welder (elementary) special operation certificate
- 炒股开户选择哪个券商公司是最安全最好呢
- Introduction to rsps2022 finalist | Dr. Yang Bai
- plsql变量赋值问题
- 2022 Chongqing preschool education industry exhibition 𞓜 hi tech Toy Puzzle decompression Toy Expo
- Pytoch -- error reporting solution: "torch/optim/adamw.py" beta1, unboundlocalerror: local variable 'beta1‘
- 请问一下flink mysql-cdc 如何保证server_id全局唯一呢?
- Grafana 9 is officially released, which is easier to use and more cool!
- Golang implements reliable delay queue based on redis
- Notes on new reports
猜你喜欢

Exness sorted out three problems to be solved in Musk's acquisition of Twitter

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

牛客网:合并区间

< JVM part I: memory and garbage collection part > 08 object instantiation and direct memory

sqlserver保存时遇到这个页面怎么回事啊

新人报道的笔记

详解openGauss多线程架构启动过程

Robotframework installation tutorial

第四届青年生命科学论坛 | 第一轮通知

Activity跳转到Fragment的方法(Intent)
随机推荐
UE4_ Ue5 make 3dui follow the camera orientation (attached works)
排序---
游戏NFT市场:OpenSea最易被切下的蛋糕
< JVM part I: memory and garbage collection part > 08 object instantiation and direct memory
Complete the sqlsession interface and implementation classes
sqlserver保存时遇到这个页面怎么回事啊
牛客网:最小覆盖子串
Game NFT Market: opensea's most easily cut cake
阻碍华为5G手机的关键芯片取得突破,国产芯片已取得一成份额
Alibaba cloud cannot find the account security group id problem during the account transfer
使用完整功能模仿设计法
You guys, the first time you used flick MySQL CDC, now the program starts without error, and the new data is not printed out
数组模拟栈
Getting started with database connection pooling (c3p0, Druid)
问下 cdc 2.2.1监控sqlServer是不支持监控多库的吗?
jsp连接MySQL总出错
When do project managers particularly want to escape from work?
Does CDC 2.2.1 monitoring sqlserver not support monitoring multiple databases?
ADAU1452开发系统界面与代码数据之间的关系
postman学习