问题
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
ifPtr
is a class template instantia-tion of the formSomePointer<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