Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

References

References are functions. They hold a reference to a value stored somewhere. For example, given:

int i = 3;
char const* s = "Hello World";

we create references to i and s this way:

ref(i)
ref(s)

Like val, the expressions above evaluates to a nullary function; the first one returning an int&, and the second one returning a char const*&.

(See references.cpp)


PrevUpHomeNext