Search code examples
c++boostc++14

How to determine boost::optional's (and other) API's?


I was trying to go through the boost optional documentation, and I find this with all of the boost docs in that I can't find a clear API definition. I want to determine:

  1. Is there is an operator& defined and if it checks for validity of the object?
  2. How can I find API information for other boost classes?

Solution

  • There are multiple ways, see e.g.:enter image description here

    Note that recently a powerful search box is added that searches all library code and documentation.

    Note that the addressof-operator couldn't be safely overloaded in portable code (although given alignment restrictions and [[no_unique_address]] in C++20 might change the equation?).