当前位置:网站首页>int GetMonth( ) const throw( );后面的throw( )什么意思?
int GetMonth( ) const throw( );后面的throw( )什么意思?
2022-07-05 21:04:00 【金士顿】
转载地址:https://blog.csdn.net/qq276592716/article/details/7625703
异常规范(Exception Specifications)
throw后面规定了该函数允许抛出什么类型的异常,空表示不抛出任何异常。这样写函数声明后,你在实现GetMonth时就不能有任何throw语句。
如果写为 int GetMonth( ) const throw(string);
函数实现时可以抛出string对象,其它类型的对象不允许。
边栏推荐
- Use of thread pool
- Simple getting started example of Web Service
- leetcode:1139. The largest square bounded by 1
- Add ICO icon to clion MinGW compiled EXE file
- Maker education infiltrating the transformation of maker spirit and culture
- 序列联配Sequence Alignment
- How to renew NPDP? Here comes the operation guide!
- AITM 2-0003 水平燃烧试验
- Abnova CD81 monoclonal antibody related parameters and Applications
- PHP deserialization +md5 collision
猜你喜欢
R语言【数据管理】
教你自己训练的pytorch模型转caffe(一)
Clion-MinGW编译后的exe文件添加ico图标
[case] Application of element display and hiding -- element mask
2.<tag-哈希表, 字符串>补充: 剑指 Offer 50. 第一个只出现一次的字符 dbc
Five layer network protocol
PVC plastic sheets BS 476-6 determination of flame propagation properties
最长摆动序列[贪心练习]
研學旅遊實踐教育的開展助力文旅產業發展
教你自己训练的pytorch模型转caffe(二)
随机推荐
How to make ERP inventory accounts of chemical enterprises more accurate
Pytorch实战——MNIST数据集手写数字识别
POJ 3414 pots (bfs+ clues)
Abnova fluorescent dye 620-m streptavidin scheme
Maker education infiltrating the transformation of maker spirit and culture
systemd-resolved 开启 debug 日志
Sequence alignment
序列联配Sequence Alignment
从架构上详解技术(SLB,Redis,Mysql,Kafka,Clickhouse)的各类热点问题
Five layer network protocol
Learning notes of SAS programming and data mining business case 19
Talk about my fate with some programming languages
Open source SPL eliminates tens of thousands of database intermediate tables
Aitm2-0002 12s or 60s vertical combustion test
Hdu2377bus pass (build more complex diagram +spfa)
教你自己训练的pytorch模型转caffe(三)
Abbkine trakine F-actin Staining Kit (green fluorescence) scheme
判断横竖屏的最佳实现
The transformation based on vertx web sstore redis to realize the distributed session of vertx HTTP application
MySQL InnoDB架构原理