Consider the following program:
struct ghost
{
// ghosts like to pretend that they don\'t exist
ghost* operator&() const volatile { return 0; }
}
Use std::addressof.
You can think of it as doing the following behind the scenes:
Existing implementations (including Boost.Addressof) do exactly that, just taking additional care of const and volatile qualification.