手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
人工智能
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
网络运维
技术频道
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
forward-declaration
forward-declaration专题提供forward-declaration的最新资讯内容,帮你更好的了解forward-declaration。
前向声明 C-Struct 会产生“不兼容的类型”-警告
我有一些使用前向声明类型 <code>A</code> 的函数: <pre><code>typedef struct AImpl A; void fun(A* a); </code></pre> <p
作者:佚名 时间:2022-04-21
传递指针参数时意外的模板实例化
以下代码无法编译(在 godbolt.org 上使用 MSVC 19.28 和 /std:c++latest 以及 Clang 12.0 和 -std=c++20 进行测试):</p
作者:佚名 时间:2023-01-24
使用 Boost::Units
因为我正在寻求减少我们代码的编译时间,我目前正在尝试减少头文件中的大量包含。为此,我在此示
作者:佚名 时间:2022-12-19
这是一种允许在 python 中进行前向声明的方法有什么理由在更大的情况下不应该工作吗?
这适用于这个小例子。 我缺少的方法有什么问题吗? 描述类基的初始版本是这样定义的 扩展 base
作者:佚名 时间:2022-11-21
前向声明后,我不能在同一命名空间中使用其他类
我希望得到一些帮助。 我在命名空间中转发声明的类 Stub。 <pre><code>print(sum(value for key, value in di
作者:佚名 时间:2022-04-16
在c中向前声明C中的匿名结构
我有一个第三方C库,其匿名结构类似于 typedef struct { ... }A; 该文件是通过程序自动生成的,因此可以根据某些内容进行更改 现在在C项目中,我接受上述类型的参数,例如as void foo(const A & in) { ... } 如何在定义上述函数的头文件中转发声明A? 我试过了 : typedef struct A A;
作者:佚名 时间:2019-08-20
C中的任何方式转发声明函数原型?
我经常使用前向类声明和指向这些类的指针. 我现在需要通过多个层传递函数指针.我更愿意将声明我的函数指针原型的头部包含在取消引用函数指针的模块中,而不是包含在简单地传递该指针值的每个层中. 这可能吗? ===== 从回复中我怀疑我没有明确地表达问题.我寻求类似于前瞻性声明.我们都同意我可以写: foo; void bar(foo *); void waz(foo * p){bar(p); } 请注意
作者:佚名 时间:2019-10-11
objective-c – 子类化时转发声明vs #import
我有MyClassA,它具有MyClassB类型的属性 // // MyClassA.h // @interface MyClassA : NSObject @property (strong, nonatomic, readonly) MyClassB *myClassB; @end MyClassB有一个属性myString. // // MyClassB.h // @in
作者:佚名 时间:2019-11-25
c – 如何转发属于类的声明模板类型?
假设我有2个课程: class A { public: typedef std::shared_ptr<A> Ref; ... private: B::Ref _b; } class B { public: typedef std::shared_ptr<B> Ref; ... private: A::Ref _a; } 这显然需要B类和B类参考号的前向声明.向前声明
作者:佚名 时间:2019-12-24
C dynamic_cast转发声明的类模板编译,但它是安全的吗?
以下代码编译并给出结果(GCC和clang): template <typename T> struct Derived; struct Base { template <typename T> void foo(T * const t) { dynamic_cast<Derived<T> * const>(this)->bar(t); } };
作者:佚名 时间:2020-01-06
在C中声明使用前
我想知道为什么C的声明使用前规则不在一个类内. 看这个例子: #ifdef BASE struct Base { #endif struct B; struct A { B *b; A(){ b->foo(); } }; struct B { void foo() {} }; #ifdef BASE }; #
作者:佚名 时间:2019-12-22
objective-c – Objective C – 错误:’预期一个类型’
我会觉得很简单的东西,我会发现一个非常奇怪的错误. #import <Foundation/Foundation.h> #import "ViewController.h" #import "GameObject.h" @interface GameController : NSObject @property (strong) GLKBaseEffect * effect; @prope
作者:佚名 时间:2019-08-19
c – 当包装在模板中时,不完整类型的新的编译器
考虑这个代码,有一个明显的编译错误:(1) struct A; struct B { B() { new A(); } // error: allocation of incomplete type 'A' }; 使用unique_ptr将无助于:(2) struct A; struct B { B() { std::make_unique<A>(); } // error: due to
作者:佚名 时间:2019-08-19
c – 将forward声明的类的成员函数声明为friend
是否可以将forward-declared类的member函数声明为friend?我正在努力做以下事情: class BigComplicatedClass; class Storage { int data_; public: int data() { return data_; } // OK, but provides too broad access: frien
作者:佚名 时间:2019-06-03
c – 无效使用不完整类型/前向声明
我试图看看Stackoverflow和Google上列出的类似问题,但他们主要处理模板,这不是我的情况.我在Debian测试64位上使用GCC 4.4.5. 所以,我有两个类 – CEntity: #ifndef CENTITY_H_INCLUDED #define CENTITY_H_INCLUDED #include "global_includes.h" // game #include
作者:佚名 时间:2019-05-30
C提升前进声明问题
我花了一些时间检查boost ::库架构,并对以下事实感兴趣: 在图书馆的某些部分,yyy_fwd.hpp的想法很常见(参见boost / detail或boost / flyweight). 这些文件显然只包含一些基于模板的类的前向声明,据我所知,编译时间可能会受益. 有人会指出他们在什么情况下可以帮助,在设计自己的模板时应该使用相同的想法吗? 谢谢. 需要转发声明来减少编译时依赖.例如,实现P
作者:佚名 时间:2019-05-22
c – 当您不想#include时,转发声明的替代方法
我通常几乎没有想过,使用前进的声明,以便我不必包括标题.这个例子的一些东西 //----------------------- // foo.h //----------------------- class foo { foo(); ~foo(); }; //----------------------- // bar.h //----------------------- c
作者:佚名 时间:2019-05-13
c – 不能使用std :: unique_ptr与T作为前向声明
现在我首先了解unique_ptr<>的一般问题和前进的声明如 Forward declaration with unique_ptr?. 考虑这三个文件: 啊 #include <memory> #include <vector> class B; class A { public: ~A(); private: std::unique_ptr<B> m_tilesets;
作者:佚名 时间:2019-05-03
c – 两个文件中相同函数/全局变量的不同声明
在C和C的情况下,我有两个关于同一函数和全局变量的声明的两个问题. >不同的函数声明 请考虑以下代码片段: file_1.c void foo(int a); int main(void) { foo('A'); } file_2.c #include <stdio.h> void foo(char a) { printf("%c", a); //prints 'A' (gcc
作者:佚名 时间:2019-04-29
函数指针typedef的前向声明
我遇到了一个特殊的问题.最好只是向您展示我正在尝试做什么,然后解释它. typedef void functionPointerType ( struct_A * sA ); typedef struct { functionPointerType ** functionPointerTable; }struct_A; 基本上,我有一个结构struct_A,其中包含一个指向函数指针表的指
作者:佚名 时间:2019-04-27
上一页
1
2
3
4
下一页
小编推荐
苹果市值2025年有望达4万亿美元
• OPPO Find X8全系标配50W无线充电:支持
• 华为GT5 Pro手表开售:首发向日葵定位系
• 骁龙X Elite处理器CPU面积庞大无比 远超
• 杨幂巴黎时装周手持华为Mate XT三折叠拍
• iPhone 16价格对比:中国最便宜 比均价
• 深圳通交通卡限时免费开卡:支持华为、
• 荣耀笔记本X16 2025首销:酷睿i5-13420
热门标签
更多
python
JavaScript
java
HTML
PHP
reactjs
C#
Android
CSS
Node.js
sql
r
python-3.x
MysqL
jQuery
c++
pandas
Flutter
angular
IOS
django
linux
swift
typescript
路由器
JSON
路由器设置
无线路由器
h3c
华三
华三路由器设置
华三路由器
电脑软件教程
arrays
docker
软件图文教程
C
vue.js
laravel
spring-boot