15

All over boost.org and also at other sites on the web I've seen code of this form:

class whatever
{
...
   private:
      std::vector<std::string> m_name;  // exposition only
};

What is the meaning of "exposition only"? What is the comment's purpose? What is it trying to tell me?

SCFrench
  • 8,244
  • 2
  • 31
  • 61

2 Answers2

11

It's used to indicate one possible way to implement the particular item, but not necessarily the best or recommended way.

Joe
  • 41,484
  • 20
  • 104
  • 125
  • It’s not clear that a standard can recommend things. A standard requires things. Even if things are optional, the requirement still has the form “it it exists, it *must* be/do this and that”. – Quirin F. Schroll Sep 02 '22 at 13:24
2

One of the definitions of "exposition" is:

the act of expounding, setting forth, or explaining

So I think they are saying that the private member (or whatever) is only shown to help you understand how the API might work ... and that is not formally part of the Boost API.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216