Comments (4)
涉及STL的才用引用。另外就是运算符重载,只能用引用。
其它都是指针。
用上我们的项目的话,记得star噢。
from workflow.
您好,感谢回复,能进一步解释下为什么涉及STL的才用引用吗?如果不方便的话我自己查下资料也可以。
from workflow.
我们这种工厂模式,应该用指针比较方便吧。让函数返回一个引用也太奇怪了。原则上,我们任何自己的类,都不会有引用,除非是运算符重载。
至于stl的对象,我们一般是传值或传引用,因为这样才能做隐式转换,例如const std::string&的地方可以传入C的字符串。
本质上我们是一个c with class项目,会尽可能用更加原始的语言特征,只代表这个项目的风格而已。
from workflow.
@liutaosgsg 没有什么别的疑问我先关了。
from workflow.
Related Issues (20)
- __poller_handle_listen, __poller_handle_read, __poller_handle_write等函数内部为什么都会有__poller_remove_node, 比如在__poller_handle_listen中的最后调用__poller_remove_node, 不就会把之前add进来的server fd删除了吗?
- 求一个基于 parallework 的 WFMysqlConnection demo HOT 1
- 关于redis-proxy 超时问题 HOT 8
- 关于会收到重复Http请求的问题 HOT 3
- workflow server能否在process中向另一个客户端创建http任务发送数据 还有对 workflow wait_group使用的问题 HOT 8
- 一个SeriesWork 使用上面的疑问 HOT 4
- 域名问题 HOT 5
- WFConditional可以加一个访问task的接口嘛 HOT 7
- http请求的body数据多了些内容? HOT 2
- Ubuntu23.04会有undefined reference to `SSL_ctrl'错误 HOT 4
- http server 如何将一个大文件分块传输给http client?
- why create_repeater_task doesnt work,what I miss here? HOT 4
- windows分支使用VS2022编译成功后,_include下没有kafka相关的头文件 HOT 20
- Update Fedora CI image version HOT 1
- KAFKA客户端的几个问题 HOT 13
- 使用xmake构建遇到一样的问题 HOT 5
- gotask设置执行时间 HOT 3
- 自定义协议,某个请求收到后不需要进行响应,process中该怎么处理? HOT 5
- 有无使用套接字连接的例子 HOT 1
- 关于tutorial-13-kafka_cli.cc错误提示的问题 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from workflow.