What does “see below” mean when used as a type or exception specification?

余生颓废 提交于 2019-12-19 08:59:36

问题


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?


回答1:


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 see below element_type;

1

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.

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

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



来源:https://stackoverflow.com/questions/21123576/what-does-see-below-mean-when-used-as-a-type-or-exception-specification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!