当前位置:网站首页>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对象,其它类型的对象不允许。
边栏推荐
- ts 之 泛型
- Write an interface based on flask
- vant 源码解析 之深层 合并对象 深拷贝
- Generics of TS
- Prior knowledge of machine learning in probability theory (Part 1)
- How to renew NPDP? Here comes the operation guide!
- Careercup its 1.8 serial shift includes problems
- Popular science | does poor English affect the NPDP exam?
- PVC plastic sheets BS 476-6 determination of flame propagation properties
- Duchefa cytokinin dihydrozeatin (DHZ) instructions
猜你喜欢

How to make ERP inventory accounts of chemical enterprises more accurate

LeetCode_哈希表_困难_149. 直线上最多的点数

LeetCode_ Hash table_ Difficulties_ 149. Maximum number of points on the line

leetcode:1755. 最接近目标值的子序列和

教你自己训练的pytorch模型转caffe(三)

研学旅游实践教育的开展助力文旅产业发展

第05章_存储引擎

Enclosed please find. Net Maui's latest learning resources

Open source SPL eliminates tens of thousands of database intermediate tables

XML建模
随机推荐
MYSQL IFNULL使用功能
Talk about my fate with some programming languages
The reason why the ncnn converted model on raspberry pie 4B always crashes when called
LeetCode: Distinct Subsequences [115]
SQL series (basic) - Chapter 2 limiting and sorting data
木板ISO 5660-1 热量释放速率摸底测试
教你自己训练的pytorch模型转caffe(一)
Traps in the explode function in PHP
研学旅游实践教育的开展助力文旅产业发展
Mathematical analysis_ Notes_ Chapter 9: curve integral and surface integral
Modifiers of attributes of TS public, private, protect
【案例】元素的显示与隐藏的运用--元素遮罩
MySQL InnoDB架构原理
示波器探头对信号源阻抗的影响
Pytorch实战——MNIST数据集手写数字识别
@Validated基础参数校验、分组参数验证和嵌套参数验证
PVC 塑料片BS 476-6 火焰传播性能测定
Analysis of steam education mode under the integration of five Education
The transformation based on vertx web sstore redis to realize the distributed session of vertx HTTP application
R语言【数据管理】