4

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?

Ben Jones
  • 919
  • 1
  • 8
  • 22
  • [Current draft is N3797](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf). – Casey Jan 14 '14 at 21:07

1 Answers1

6

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.

odinthenerd
  • 5,422
  • 1
  • 32
  • 61
  • That makes sense in the text of the standard, but it shows up in typdefes in the headers that I have (OS X's copy of LLVM libc++ atomic, memory, function, and scoped_allocator) – Ben Jones Jan 14 '14 at 21:07
  • 1
    @BenJones Those are excerpts of the standard text included in large block comments as documentation of sorts. – Casey Jan 14 '14 at 21:09
  • ...foiled by less's lack of syntax highlighting. Thanks. – Ben Jones Jan 14 '14 at 21:11