Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top