什么是“见下文"?用作类型或异常规范时是什么意思? [英] What does "see below" mean when used as a type or exception specification?

查看:158
本文介绍了什么是“见下文"?用作类型或异常规范时是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

浏览C ++标准(最新草案 http://isocpp .org/files/papers/N3690.pdf ,第20.8.3秒就是这样一个地方),通过LLVM的libc ++标头,我发现参见下文"被用作类型和异常规范.它似乎在不存在任何类型的情况下使用,但是为此使用2个单词的短语代替某种有效的标识符似乎很奇怪.

Looking through the C++ standard (current draft http://isocpp.org/files/papers/N3690.pdf, sec 20.8.3 is one such place) and through LLVM's libc++ headers, I've found "see below" used as a type and exception specification. It seems to be used when no type exists, but it seemed strange to use a 2 word phrase for that instead of some sort of valid identifier.

是在标准的某个地方还是其他地方进行了讨论?为什么/如何使用?

Is it discussed somewhere in the standard or elsewhere? Why/how is it used?

推荐答案

见下文只是占位符,代表了以下几种可能的类型之一.例如此处:

see below is simply a place holder for one of a few possible types which are always described in the following text. For example here:

typedef 请参见下文 element_type;

typedef see below element_type;

1

类型:Ptr::element_type(如果存在);否则,如果T Ptr是形式为SomePointer<T, Args>的类模板实例,其中 Args是零个或多个类型参数;否则,专业化形式将不正确.

Type: Ptr::element_type if such a type exists; otherwise, T if Ptr is a class template instantia-tion of the form SomePointer<T, Args>, where Args is zero or more type arguments; otherwise, the specialization is ill-formed.

如果SomePointer<T, Args>有效,请替换Ptr::element_typeT.参见以下,具体取决于上下文.

you may subsitute Ptr::element_type or T if SomePointer<T, Args> is valid for see below depending on context.

此表单被称为语法类别,并且在同一文档的第1.6节中进行了描述.

This form is named a syntactic category and is described in section 1.6 of the same document.

这篇关于什么是“见下文"?用作类型或异常规范时是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆