Simplify index documentation and add author information

This commit is contained in:
Glen Fernandes committed 2014-06-05 10:48:21 -07:00
1 parent 658aa6205c
commit 03acd30dda
13 files changed
+229 -105

No files matched your search

+33 -1
View File
@@ -1,4 +1,14 @@
[section:addressof Header <boost/core/addressof.hpp>]
[section:addressof addressof]
[section Authors]
* Brad King
* Douglas Gregor
* Peter Dimov
[endsect]
[section Header <boost/core/addressof.hpp>]
The header `<boost/core/addressof.hpp>` defines the function
template `boost::addressof`. `boost::addressof(x)` returns the
@@ -9,3 +19,25 @@ address of `x`. Ordinarily, this address can be obtained by
based on ideas from discussion with Doug Gregor.
[endsect]
[section Example]
``
#include <boost/core/addressof.hpp>
struct useless_type { };
class nonaddressable {
useless_type operator&() const;
};
void f() {
nonaddressable x;
nonaddressable* xp = boost::addressof(x);
// nonaddressable* xpe = &x; /* error */
}
``
[endsect]
[endsect]